-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
backlogKeep open for later (typically, not a problem for SPIRIT but maybe for other woo.sh projects)Keep open for later (typically, not a problem for SPIRIT but maybe for other woo.sh projects)
Description
Using the variable name var
as an exported variable name throws an exception in the current version (see below):
"missing/invalid action definition for transaction - Uncaught SyntaxError: Unexpected token var - SyntaxError: Unexpected token var\n at new Function (<anonymous>)"
This is not really a bug but an implementation limitation, caused by the fact that declared variables are represented literally as they are defined in queries (thus disallowing all javascript keywords from being used). A better alternative would therefore be to automatically add some export prefix. For example:
// encode variable "var"
let ___exported_var = ...;
Metadata
Metadata
Assignees
Labels
backlogKeep open for later (typically, not a problem for SPIRIT but maybe for other woo.sh projects)Keep open for later (typically, not a problem for SPIRIT but maybe for other woo.sh projects)