slate 0.81.3 → 0.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1099,13 +1099,16 @@ var Editor = {
1099
1099
  * Check if a value is an `Editor` object.
1100
1100
  */
1101
1101
  isEditor(value) {
1102
- if (!isPlainObject(value)) return false;
1103
1102
  var cachedIsEditor = IS_EDITOR_CACHE.get(value);
1104
1103
 
1105
1104
  if (cachedIsEditor !== undefined) {
1106
1105
  return cachedIsEditor;
1107
1106
  }
1108
1107
 
1108
+ if (!isPlainObject(value)) {
1109
+ return false;
1110
+ }
1111
+
1109
1112
  var isEditor = typeof value.addMark === 'function' && typeof value.apply === 'function' && typeof value.deleteBackward === 'function' && typeof value.deleteForward === 'function' && typeof value.deleteFragment === 'function' && typeof value.insertBreak === 'function' && typeof value.insertSoftBreak === 'function' && typeof value.insertFragment === 'function' && typeof value.insertNode === 'function' && typeof value.insertText === 'function' && typeof value.isInline === 'function' && typeof value.isVoid === 'function' && typeof value.normalizeNode === 'function' && typeof value.onChange === 'function' && typeof value.removeMark === 'function' && (value.marks === null || isPlainObject(value.marks)) && (value.selection === null || Range.isRange(value.selection)) && Node.isNodeList(value.children) && Operation.isOperationList(value.operations);
1110
1113
  IS_EDITOR_CACHE.set(value, isEditor);
1111
1114
  return isEditor;