reka.js
reka.js copied to clipboard
Bug if default object is instantiated with global value
Occurs if objects are set as defaults for props after closing and reopening the code editor. Then a comma is inserted wrong.
val isModalOpen:any = false;
// good
component Header(
default={"open": isModalOpen }
) => (...)
val isModalOpen:any = false;
// bad
component Header(
default:any={,
"open": isModalOpen,
}
) => (...)
If the comma gets removed one gets an unexpected error at the beginning of the document. Which is fixed if both commas are rmoved as in the good example.