mirror of
https://github.com/codex-team/editor.js
synced 2024-06-26 09:20:07 +02:00
Fix case when property 'observer' in modificationObserver is not defined (#866)
This commit is contained in:
parent
d22667df62
commit
e2ca2a6de9
8
dist/editor.js
vendored
8
dist/editor.js
vendored
File diff suppressed because one or more lines are too long
|
@ -6,6 +6,7 @@
|
|||
- `Refactoring` — Created universal Flipper class that responses for navigation by keyboard inside of any Toolbars
|
||||
- `Fix` — First CMD+A on block with now uses default behaviour. Fixed problem with second CMD+A after selection clearing [#827](https://github.com/codex-team/editor.js/issues/827)
|
||||
- `Improvements` — Style of inline selection and selected blocks improved
|
||||
- `Fix` - Fixed problem when property 'observer' in modificationObserver is not defined
|
||||
|
||||
### 2.15
|
||||
|
||||
|
|
|
@ -47,7 +47,9 @@ export default class ModificationsObserver extends Module {
|
|||
*/
|
||||
public destroy() {
|
||||
this.mutationDebouncer = null;
|
||||
this.observer.disconnect();
|
||||
if (this.observer) {
|
||||
this.observer.disconnect();
|
||||
}
|
||||
this.observer = null;
|
||||
this.nativeInputs.forEach((input) => this.Editor.Listeners.off(input, 'input', this.mutationDebouncer));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue