Skip to content

Commit d7dca6d

Browse files
tomer953atscott
authored andcommitted
fix(compiler): use strict equality for 'code' comparison (#56944)
Replace loose equality (==) with strict equality (===) for the 'code' variable. This change ensures type safety and prevents unintended type coercion. PR Close #56944
1 parent f6eec48 commit d7dca6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/compiler/src/ml_parser/lexer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ class _Tokenizer {
409409
this._attemptCharCodeUntilFn((code) => {
410410
if (
411411
chars.isAsciiLetter(code) ||
412-
code == chars.$$ ||
412+
code === chars.$$ ||
413413
code === chars.$_ ||
414414
// `@let` names can't start with a digit, but digits are valid anywhere else in the name.
415415
(allowDigit && chars.isDigit(code))

0 commit comments

Comments
 (0)