Skip to content

Commit

Permalink
fix(common): missing space in ngSwitch equality warning
Browse files Browse the repository at this point in the history
This adds a missing space between the sentences of the `===` vs `==` ngSwitch warning.
  • Loading branch information
cexbrayat committed Oct 12, 2023
1 parent 908f660 commit b363105
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/directives/ng_switch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class NgSwitch {
`Previously the case value "${
stringifyValue(value)}" matched switch expression value "${
stringifyValue(
this._ngSwitch)}", but this is no longer the case with the stricter equality check.` +
this._ngSwitch)}", but this is no longer the case with the stricter equality check. ` +
'Your comparison results return different results using === vs. == and you should adjust your ngSwitch expression and / or values to conform with the strict equality requirements.'));
}
this._lastCasesMatched = this._lastCasesMatched || matched;
Expand Down
2 changes: 1 addition & 1 deletion packages/common/test/directives/ng_switch_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ import {expect} from '@angular/platform-browser/testing/src/matchers';
expect(consoleWarnSpy.calls.argsFor(0)[0])
.toBe(
'NG02001: As of Angular v17 the NgSwitch directive uses strict equality comparison === instead of == to match different cases. ' +
`Previously the case value "1" matched switch expression value "'1'", but this is no longer the case with the stricter equality check.` +
`Previously the case value "1" matched switch expression value "'1'", but this is no longer the case with the stricter equality check. ` +
'Your comparison results return different results using === vs. == and you should adjust your ngSwitch expression and / or values to conform with the strict equality requirements.');


Expand Down

0 comments on commit b363105

Please sign in to comment.