fix(curriculum): Regex should only allow == or === in equality check (#62134)

This commit is contained in:
Jannis Klose
2025-09-10 13:23:12 +00:00
committed by GitHub
parent 8476761422
commit efe8114fc3
@@ -18,7 +18,7 @@ Above your `currentContent = newContent;` line, add an `if` statement to check i
You should add an `if` statement to check if `currentContent` is equal to `newContent`. If so, return.
```js
assert.match(code, /if\s*\(\s*currentContent\s*=={2,3}\s*newContent\s*\)\s*(?:{\s*return;?\s*}|return\s*;?)/);
assert.match(code, /if\s*\(\s*currentContent\s*={2,3}\s*newContent\s*\)\s*(?:{\s*return;?\s*}|return\s*;?)/);
```
# --seed--