You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the breadcrumbService.ts file, in the getFriendlyNameForRoute method, variable name is created as a string but not assigned. At the end of the method, it is checked against a falsy value.
However, since its type is only string, TypeScript does not allow for it to be undefined in strict mode.
Even if this compiles correctly in normal modes, it does not when in strict mode, and should be fixed.
A simple fix considering the actual usage would just be to make the type string | undefined and everything would work as is.
Here is the actual tsc error message:
node_modules/ng2-breadcrumb/app/components/breadcrumbService.ts(83,16): error TS2454: Variable 'name' is used before being assigned.
The text was updated successfully, but these errors were encountered:
In the breadcrumbService.ts file, in the getFriendlyNameForRoute method, variable name is created as a string but not assigned. At the end of the method, it is checked against a falsy value.
However, since its type is only string, TypeScript does not allow for it to be undefined in strict mode.
Even if this compiles correctly in normal modes, it does not when in strict mode, and should be fixed.
A simple fix considering the actual usage would just be to make the type
string | undefined
and everything would work as is.Here is the actual tsc error message:
node_modules/ng2-breadcrumb/app/components/breadcrumbService.ts(83,16): error TS2454: Variable 'name' is used before being assigned.
The text was updated successfully, but these errors were encountered: