Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/const-enum.js
Original file line number Diff line number Diff line change
@@ -149,10 +149,9 @@ export function scanEnums() {
} else {
if (lastInitialized === undefined) {
// first initialized
saveValue(`0`)
lastInitialized = 0
saveValue((lastInitialized = 0))
} else if (typeof lastInitialized === 'number') {
saveValue(String(++lastInitialized))
saveValue(++lastInitialized)
} else {
// should not happen
throw new Error(`wrong enum initialization sequence in ${file}`)

0 comments on commit 92bb189

Please sign in to comment.