@@ -175,13 +175,10 @@ export function prop(props, key, flags, initial) {
175
175
// intermediate mode — prop is written to, but the parent component had
176
176
// `bind:foo` which means we can just call `$$props.foo = value` directly
177
177
if ( setter ) {
178
- return function ( /** @type {V } */ value , mutation = false ) {
178
+ return function ( /** @type {V } */ value ) {
179
179
if ( arguments . length === 1 ) {
180
180
/** @type {Function } */ ( setter ) ( value ) ;
181
181
return value ;
182
- } else if ( mutation ) {
183
- /** @type {Function } */ ( setter ) ( getter ( ) ) ;
184
- return value ;
185
182
} else {
186
183
return getter ( ) ;
187
184
}
@@ -213,7 +210,7 @@ export function prop(props, key, flags, initial) {
213
210
214
211
if ( ! immutable ) current_value . equals = safe_equals ;
215
212
216
- return function ( /** @type {V } */ value , mutation = false ) {
213
+ return function ( /** @type {V } */ value ) {
217
214
var current = get ( current_value ) ;
218
215
219
216
// legacy nonsense — need to ensure the source is invalidated when necessary
@@ -229,9 +226,9 @@ export function prop(props, key, flags, initial) {
229
226
}
230
227
231
228
if ( arguments . length > 0 ) {
232
- if ( mutation || ( immutable ? value !== current : safe_not_equal ( value , current ) ) ) {
229
+ if ( ! current_value . equals ( value ) ) {
233
230
from_child = true ;
234
- set ( inner_current_value , mutation ? current : value ) ;
231
+ set ( inner_current_value , value ) ;
235
232
get ( current_value ) ; // force a synchronisation immediately
236
233
}
237
234
0 commit comments