🐞 bug report
Affected Package
The issue is caused by package @angular/router
Is this a regression?
Yes, the previous version in which this bug was not present was: 11.0.5
Description
Trying to activate a route in IE11 using Angular 11.0.6 or 11.0.7 with default Angular CLI polyfill configuration results in an error about Object.values not being found, as IE11 doesn’t support that by default. A similar defect with Object.entries was fixed in Angular 11.0.7. I searched the code base briefly and could not find any other usages of either function in any code that can be used at runtime.
🔬 Minimal Reproduction
StackBlitz doesn’t support IE11, but basically any HelloWorld application for Angular routing that contains a componentless route will produce the issue by simply clicking to a different route.
🔥 Exception or Error
TypeError: Object doesn't support property or method 'values'
🌍 Your Environment
Angular Version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 11.0.6
Node: 14.15.1
OS: win32 x64
Angular: 11.0.7
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.1100.5
@angular-devkit/build-angular 0.1100.6
@angular-devkit/core 11.0.5
@angular-devkit/schematics 11.0.6
@angular/cdk 11.0.3
@angular/cli 11.0.6
@angular/material 11.0.3
@angular/material-moment-adapter 11.0.3
@schematics/angular 11.0.6
@schematics/update 0.1100.6
rxjs 6.6.3
typescript 4.0.5
Anything else relevant?
This is specific only to browsers that do not support Object.values when using default polyfill configuration from Angular CLI. (The only one I care about is IE11, although I’m not sure if that’s the only one in the list of browsers supported by Angular.) I can easily add a polyfill for Object.values, but Angular itself shouldn’t require any modifications to the default polyfills provided by the CLI simply to run out-of-the-box functionality.
N/A
@liesahead – This was already removed in 2028a43 and 6429be1. The fix should already have appeared in 11.0.7.
@petebacondarwin, indeed, everything seems fine now. Thanks!