File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
export class NavigationDuplicated extends Error {
2
2
constructor ( ) {
3
3
super ( 'Navigating to current location is not allowed' )
4
- this . name = 'NavigationDuplicated'
4
+ this . name = this . _name = 'NavigationDuplicated'
5
5
}
6
6
}
7
+
8
+ // support IE9
9
+ NavigationDuplicated . _name = 'NavigationDuplicated'
Original file line number Diff line number Diff line change @@ -17,5 +17,9 @@ export function isError (err: any): boolean {
17
17
}
18
18
19
19
export function isExtendedError ( constructor : Function , err : any ) : boolean {
20
- return err instanceof constructor || ( err && err . name === constructor . name )
20
+ return (
21
+ err instanceof constructor ||
22
+ // _name is to support IE9 too
23
+ ( err && ( err . name === constructor . name || err . _name === constructor . _name ) )
24
+ )
21
25
}
You can’t perform that action at this time.
0 commit comments