ripple 0.2.158 → 0.2.159

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.158",
6
+ "version": "0.2.159",
7
7
  "type": "module",
8
8
  "module": "src/runtime/index-client.js",
9
9
  "main": "src/runtime/index-client.js",
@@ -81,6 +81,6 @@
81
81
  "typescript": "^5.9.2"
82
82
  },
83
83
  "peerDependencies": {
84
- "ripple": "0.2.158"
84
+ "ripple": "0.2.159"
85
85
  }
86
86
  }
@@ -821,20 +821,21 @@ const visitors = {
821
821
  * @param {any} context
822
822
  */
823
823
  AwaitExpression(node, context) {
824
+ const parent_block = get_parent_block_node(context);
825
+
824
826
  if (is_inside_component(context)) {
825
827
  if (context.state.metadata?.await === false) {
826
828
  context.state.metadata.await = true;
827
829
  }
828
- }
829
- const parent_block = get_parent_block_node(context);
830
830
 
831
- if (parent_block !== null && parent_block.type !== 'Component') {
832
- if (context.state.inside_server_block === false) {
833
- error(
834
- '`await` is not allowed in client-side control-flow statements',
835
- context.state.analysis.module.filename,
836
- node,
837
- );
831
+ if (parent_block !== null && parent_block.type !== 'Component') {
832
+ if (context.state.inside_server_block === false) {
833
+ error(
834
+ '`await` is not allowed in client-side control-flow statements',
835
+ context.state.analysis.module.filename,
836
+ node,
837
+ );
838
+ }
838
839
  }
839
840
  }
840
841