From 37ccf68bec7d2f91900e7c8fc6fd54e2f238ea1d Mon Sep 17 00:00:00 2001 From: Christian Murphy Date: Thu, 3 Mar 2022 20:18:21 -0700 Subject: [PATCH] types: ensure location attrs exists --- lib/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]) } }