@wuchale/svelte 0.20.4 → 0.20.5
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/dist/transformer.js +3 -3
- package/package.json +1 -1
package/dist/transformer.js
CHANGED
|
@@ -41,8 +41,8 @@ export class SvelteTransformer extends Transformer {
|
|
|
41
41
|
if (msg.details.leftSide) {
|
|
42
42
|
return false;
|
|
43
43
|
}
|
|
44
|
-
const
|
|
45
|
-
if (noWrapTopCalls.includes(
|
|
44
|
+
const call = msg.details.topLevelCall ?? msg.details.call ?? '';
|
|
45
|
+
if (noWrapTopCalls.includes(call) || noWrapTopCalls.some(c => call.startsWith(`${c}.`))) {
|
|
46
46
|
return false;
|
|
47
47
|
}
|
|
48
48
|
if (msg.details.declaring !== 'variable') {
|
|
@@ -208,7 +208,7 @@ export class SvelteTransformer extends Transformer {
|
|
|
208
208
|
return this.visit(node.expression);
|
|
209
209
|
}
|
|
210
210
|
visitOnDirective(node) {
|
|
211
|
-
return this.visit(node.expression);
|
|
211
|
+
return node.expression ? this.visit(node.expression) : [];
|
|
212
212
|
}
|
|
213
213
|
hasIdentifier(node, name) {
|
|
214
214
|
if (!node || typeof node !== 'object') {
|