File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
packages/svelte/src/internal/client/dev Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ import { get_proxied_value } from '../proxy.js';
3
3
4
4
export function init_array_prototype_warnings ( ) {
5
5
const array_prototype = Array . prototype ;
6
+ // @ts -expect-error
7
+ const cleanup = Array . __svelte_cleanup ;
8
+ if ( cleanup ) {
9
+ cleanup ( ) ;
10
+ }
11
+
6
12
const { indexOf, lastIndexOf, includes } = array_prototype ;
7
13
8
14
array_prototype . indexOf = function ( item , from_index ) {
@@ -55,6 +61,13 @@ export function init_array_prototype_warnings() {
55
61
56
62
return has ;
57
63
} ;
64
+
65
+ // @ts -expect-error
66
+ Array . __svelte_cleanup = ( ) => {
67
+ array_prototype . indexOf = indexOf ;
68
+ array_prototype . lastIndexOf = lastIndexOf ;
69
+ array_prototype . includes = includes ;
70
+ } ;
58
71
}
59
72
60
73
/**
You can’t perform that action at this time.
0 commit comments