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 11export class NavigationDuplicated extends Error {
22 constructor ( ) {
33 super ( 'Navigating to current location is not allowed' )
4- this . name = 'NavigationDuplicated'
4+ this . name = this . _name = 'NavigationDuplicated'
55 }
66}
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 {
1717}
1818
1919export 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+ )
2125}
You can’t perform that action at this time.
0 commit comments