wiki-plugin-mech 0.1.6 → 0.1.7
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/client/mech.js +4 -4
- package/package.json +1 -1
package/client/mech.js
CHANGED
|
@@ -190,12 +190,12 @@
|
|
|
190
190
|
|
|
191
191
|
function walk_emit ({elem,command,args,state}) {
|
|
192
192
|
const steps = Object.groupBy(walks(state.neighborhood),({graph})=>graph?'some':'none')
|
|
193
|
-
console.log({steps})
|
|
194
|
-
const nodes = steps.some.map(({graph}) => graph.nodes).flat()
|
|
195
|
-
elem.innerHTML = command + ` ⇒ ${steps.some.length} aspects, ${steps.none.length} empty, ${nodes.length} nodes`
|
|
193
|
+
if(state.debug) console.log({steps})
|
|
194
|
+
const nodes = (steps.some||[]).map(({graph}) => graph.nodes).flat()
|
|
195
|
+
elem.innerHTML = command + ` ⇒ ${(steps.some||[]).length} aspects, ${(steps.none||[]).length} empty, ${nodes.length} nodes`
|
|
196
196
|
const item = elem.closest('.item')
|
|
197
197
|
item.classList.add('aspect-source')
|
|
198
|
-
item.aspectData = () => steps.some
|
|
198
|
+
item.aspectData = () => (steps.some||[])
|
|
199
199
|
state.aspect = [{div:item,result:steps.some}]
|
|
200
200
|
}
|
|
201
201
|
|