diff --git a/06-ref.js b/06-ref.js index a6eb520..fb71de7 100644 --- a/06-ref.js +++ b/06-ref.js @@ -59,8 +59,10 @@ function ref(raw) { return raw }, set value(newVal) { - raw = newVal - trigger(r, 'value') + if(raw != newVal){ + raw = newVal + trigger(r, 'value') + } }, } return r