Skip to content

Commit 92bb189

Browse files
committed
fix(build): fix const enum w/ number values
1 parent 097f6be commit 92bb189

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

scripts/const-enum.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,9 @@ export function scanEnums() {
149149
} else {
150150
if (lastInitialized === undefined) {
151151
// first initialized
152-
saveValue(`0`)
153-
lastInitialized = 0
152+
saveValue((lastInitialized = 0))
154153
} else if (typeof lastInitialized === 'number') {
155-
saveValue(String(++lastInitialized))
154+
saveValue(++lastInitialized)
156155
} else {
157156
// should not happen
158157
throw new Error(`wrong enum initialization sequence in ${file}`)

0 commit comments

Comments
 (0)