@sbscomp seems some plugin (or something) is removing wp.autosave.local? If that is really really needed, at least should be done in a compatible way. Or if there is a good user case for it, open a core ticket 🙂
Thanks for the follow-up Andrew. Digging into the code, I find in looking at the code in autosave.js, it appears that the autosaveLocal() function which is used to initialize the autosave.local property willa return an undefined/null value if the checkStorage() method does not return true (for example, if local storage is disabled or otherwise not available).
The after-the-dark component of jetpack assumes that this object is always available and the method therein is always present.
From my read, then, either ATD needs to check for that being present (per my proposed patch), or the core autosave module needs to set a flag which indicates that the methods should not proceed but rather act as a noop and return. (full disclosure: I’m not a JS guru, I’m a server dev by trade, so there may be a third option I’m not aware of).