diff --git a/Lexical/Core/Editor.swift b/Lexical/Core/Editor.swift index 9291573..477b3e0 100644 --- a/Lexical/Core/Editor.swift +++ b/Lexical/Core/Editor.swift @@ -230,7 +230,7 @@ public class Editor: NSObject { return { [weak self] in guard let self else { return } - self.listeners.update.removeValue(forKey: uuid) + self.listeners.errors.removeValue(forKey: uuid) } } diff --git a/Lexical/Core/Reconciler.swift b/Lexical/Core/Reconciler.swift index fc75def..2890926 100644 --- a/Lexical/Core/Reconciler.swift +++ b/Lexical/Core/Reconciler.swift @@ -467,8 +467,8 @@ internal enum Reconciler { nextChildrenSet = Set(nextChildren) } - let nextHasPrevKey = nextChildren.contains(prevKey) - let prevHasNextKey = prevChildren.contains(nextKey) + let nextHasPrevKey = nextChildrenSet!.contains(prevKey) + let prevHasNextKey = prevChildrenSet!.contains(nextKey) if !nextHasPrevKey { // Remove prev