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.
Files changed (2) hide show
  1. package/client/mech.js +4 -4
  2. 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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-plugin-mech",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Federated Wiki - Mechanism Scripting Plugin",
5
5
  "keywords": [
6
6
  "mech",