leanweb 1.3.2 → 1.3.3
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/package.json
CHANGED
|
@@ -172,7 +172,10 @@ const nodeHandlers = {
|
|
|
172
172
|
|
|
173
173
|
const immediateContext = (node, context) => {
|
|
174
174
|
if (Array.isArray(context)) {
|
|
175
|
-
|
|
175
|
+
if (context.length === 0) {
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
return context.find(contextObj => node.name in contextObj) ?? context[0];
|
|
176
179
|
} else if (typeof context === 'object') {
|
|
177
180
|
return context;
|
|
178
181
|
}
|