Skip to content

Commit

Permalink
json5/parse.js: enclose 'default' property in quotes
Browse files Browse the repository at this point in the history
'default' is an ES6 reserved keyword. When used as a property name it must
be enclosed in quotes.
  • Loading branch information
msssk committed Jul 8, 2021
1 parent f689cf2 commit b51dc65
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions json5/README.md
Expand Up @@ -13,6 +13,7 @@ tsc lib/parse.js lib/unicode.js lib/util.js --allowJs --module ES6 --outDir dojo
to be made
* Copy the files from the `json5/dojo` folder to the `dojo/json5` folder
* Manual updates:
* IMPORTANT: wrap the `lexStates` object property `default:` in quotes => `'default':`
* convert indentation to tabs in each module
* remove any trailing commas
* convert each module to AMD syntax
Expand Down
2 changes: 1 addition & 1 deletion json5/parse.js
Expand Up @@ -87,7 +87,7 @@ define([
return c;
}
var lexStates = {
default: function () {
'default': function () {
switch (c) {
case '\t':
case '\v':
Expand Down

0 comments on commit b51dc65

Please sign in to comment.