ripple 0.2.54 → 0.2.56

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
@@ -3,7 +3,7 @@
3
3
  "description": "Ripple is an elegant TypeScript UI framework",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.2.54",
6
+ "version": "0.2.56",
7
7
  "type": "module",
8
8
  "module": "src/runtime/index.js",
9
9
  "main": "src/runtime/index.js",
@@ -674,7 +674,11 @@ const visitors = {
674
674
  }
675
675
 
676
676
  if (update.length > 0) {
677
- state.init.push(b.stmt(b.call('$.render', b.thunk(b.block(update), update.async ?? true))));
677
+ if (state.scope.parent.declarations.size > 0) {
678
+ state.init.push(b.stmt(b.call('$.render', b.thunk(b.block(update), !!update.async))));
679
+ } else {
680
+ state.update.push(...update);
681
+ }
678
682
  }
679
683
  } else {
680
684
  const id = state.flush_node();
@@ -26,7 +26,7 @@ import {
26
26
  REF_PROP,
27
27
  } from './constants';
28
28
  import { capture, suspend } from './try.js';
29
- import { define_property, is_ripple_array } from './utils';
29
+ import { define_property } from './utils';
30
30
 
31
31
  const FLUSH_MICROTASK = 0;
32
32
  const FLUSH_SYNC = 1;