rip-lang 3.10.11 → 3.10.12
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.
|
Binary file
|
package/package.json
CHANGED
package/src/components.js
CHANGED
|
@@ -688,8 +688,14 @@ export function installComponentSupport(CodeGenerator, Lexer) {
|
|
|
688
688
|
// Effects
|
|
689
689
|
for (const effect of effects) {
|
|
690
690
|
const effectBody = effect[2];
|
|
691
|
-
|
|
692
|
-
|
|
691
|
+
if (this.is(effectBody, 'block') && effectBody.length > 2) {
|
|
692
|
+
const transformed = this.transformComponentMembers(effectBody);
|
|
693
|
+
const body = this.generateFunctionBody(transformed, [], true);
|
|
694
|
+
lines.push(` __effect(() => ${body});`);
|
|
695
|
+
} else {
|
|
696
|
+
const effectCode = this.generateInComponent(effectBody, 'value');
|
|
697
|
+
lines.push(` __effect(() => { ${effectCode}; });`);
|
|
698
|
+
}
|
|
693
699
|
}
|
|
694
700
|
|
|
695
701
|
lines.push(' }');
|