diff --git a/lib/index.js b/lib/index.js index d57ba04..8820825 100644 --- a/lib/index.js +++ b/lib/index.js @@ -286,7 +286,7 @@ function createLocation(ctx, node, location) { let key for (key in location.attrs) { - if (own.call(location.attrs, key)) { + if (location.attrs && own.call(location.attrs, key)) { props[find(ctx.schema, key).property] = position(location.attrs[key]) } }