mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-19 09:33:05 +00:00
[Javascript] Fix syntax error for signed enum (#5503)
* wrap quotes to enum name map to prevent syntax errorn when enum value is negative * Add a test that covers signed enum case
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
d0e3870c0f
commit
4b870aca98
@@ -17,13 +17,13 @@ var Character = {
|
||||
* @enum {string}
|
||||
*/
|
||||
var CharacterName = {
|
||||
0: 'NONE',
|
||||
1: 'MuLan',
|
||||
2: 'Rapunzel',
|
||||
3: 'Belle',
|
||||
4: 'BookFan',
|
||||
5: 'Other',
|
||||
6: 'Unused'
|
||||
'0': 'NONE',
|
||||
'1': 'MuLan',
|
||||
'2': 'Rapunzel',
|
||||
'3': 'Belle',
|
||||
'4': 'BookFan',
|
||||
'5': 'Other',
|
||||
'6': 'Unused'
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user