File tree 1 file changed +3
-3
lines changed
packages/kit/src/runtime/client 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -70,13 +70,13 @@ if (DEV && BROWSER) {
70
70
const warn = ( ) => {
71
71
if ( warned ) return ;
72
72
73
- // Avoid stashing away the original history methods which prevents monkeypatching by other libs,
74
- // instead inspect the stack trace to see if we're being called from within SvelteKit.
73
+ // Rather than saving a pointer to the original history methods, which would prevent monkeypatching by other libs,
74
+ // inspect the stack trace to see if we're being called from within SvelteKit.
75
75
let stack = new Error ( ) . stack ?. split ( '\n' ) ;
76
76
if ( ! stack ) return ;
77
77
if ( ! stack [ 0 ] . includes ( 'https:' ) && ! stack [ 0 ] . includes ( 'http:' ) ) stack = stack . slice ( 1 ) ; // Chrome includes the error message in the stack
78
78
stack = stack . slice ( 2 ) ; // remove `warn` and the place where `warn` was called
79
- if ( stack [ 0 ] . includes ( 'src/runtime/client/client.js' ) ) return ;
79
+ if ( stack [ 0 ] . includes ( import . meta . url ) ) return ;
80
80
81
81
warned = true ;
82
82
You can’t perform that action at this time.
0 commit comments