You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am experiencing an issue when initializing an array as shown in the attached images. The initialization works correctly when done via the interface, but results in an error when stringified in the code. Specifically, I encounter the error:
Unexpected token (1:10)
This issue also occurs when initializing the array as a JSON object. However, the initialization works fine if the array contains only a single value.
Steps to Reproduce:
Initialize an array in the code as shown in the provided screenshot:
component App(test: any = ["1", "2"]) {
val text: any = "Bye";
val counter: any = 0;
}
Alternatively, initialize the array as a JSON object:
component App(test: any = { "test": ["1", "2"] }) {
val text: any = "Bye";
val counter: any = 0;
}
Attempt to stringify the code.
Expected Behavior:
The array should be initialized without any errors, similar to the behavior observed when the initialization is done via the interface.
Actual Behavior:
The code throws an Unexpected token (1:10) error when attempting to stringify the array initialization.
Thank you.
The text was updated successfully, but these errors were encountered:
I am experiencing an issue when initializing an array as shown in the attached images. The initialization works correctly when done via the interface, but results in an error when stringified in the code. Specifically, I encounter the error:
Unexpected token (1:10)
This issue also occurs when initializing the array as a JSON object. However, the initialization works fine if the array contains only a single value.
Steps to Reproduce:
Expected Behavior:
The array should be initialized without any errors, similar to the behavior observed when the initialization is done via the interface.
Actual Behavior:
The code throws an Unexpected token (1:10) error when attempting to stringify the array initialization.
Thank you.
The text was updated successfully, but these errors were encountered: