File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
packages/svelte/src/internal/client/reactivity Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,16 @@ const spread_props_handler = {
165
165
while ( i -- ) {
166
166
let p = target . props [ i ] ;
167
167
if ( is_function ( p ) ) p = p ( ) ;
168
- if ( typeof p === 'object' && p !== null && key in p ) return get_descriptor ( p , key ) ;
168
+ if ( typeof p === 'object' && p !== null && key in p ) {
169
+ const descriptor = get_descriptor ( p , key ) ;
170
+ if ( descriptor && ! descriptor . configurable ) {
171
+ // Prevent a "Non-configurability Report Error": The target is an array, it does
172
+ // not actually contain this property. If it is now described as non-configurable,
173
+ // the proxy throws a validation error. Setting it to true avoids that.
174
+ descriptor . configurable = true ;
175
+ }
176
+ return descriptor ;
177
+ }
169
178
}
170
179
} ,
171
180
has ( target , key ) {
You can’t perform that action at this time.
0 commit comments