File tree Expand file tree Collapse file tree 13 files changed +35
-13
lines changed Expand file tree Collapse file tree 13 files changed +35
-13
lines changed Original file line number Diff line number Diff line change @@ -1030,7 +1030,9 @@ function defineReactive$$1 (
1030
1030
set : function reactiveSetter ( newVal ) {
1031
1031
var value = getter ? getter . call ( obj ) : val ;
1032
1032
/* eslint-disable no-self-compare */
1033
- if ( newVal === value || ( newVal !== newVal && value !== value ) ) {
1033
+ // We allow same values for getters
1034
+ // See this: https://github.com/vuejs/vue/pull/7828#issuecomment-446820288
1035
+ if ( ( newVal === value && ! getter ) || ( newVal !== newVal && value !== value ) ) {
1034
1036
return
1035
1037
}
1036
1038
/* eslint-enable no-self-compare */
Original file line number Diff line number Diff line change @@ -1028,7 +1028,9 @@ function defineReactive$$1 (
1028
1028
set : function reactiveSetter ( newVal ) {
1029
1029
var value = getter ? getter . call ( obj ) : val ;
1030
1030
/* eslint-disable no-self-compare */
1031
- if ( newVal === value || ( newVal !== newVal && value !== value ) ) {
1031
+ // We allow same values for getters
1032
+ // See this: https://github.com/vuejs/vue/pull/7828#issuecomment-446820288
1033
+ if ( ( newVal === value && ! getter ) || ( newVal !== newVal && value !== value ) ) {
1032
1034
return
1033
1035
}
1034
1036
/* eslint-enable no-self-compare */
Original file line number Diff line number Diff line change 1034
1034
set : function reactiveSetter ( newVal ) {
1035
1035
var value = getter ? getter . call ( obj ) : val ;
1036
1036
/* eslint-disable no-self-compare */
1037
- if ( newVal === value || ( newVal !== newVal && value !== value ) ) {
1037
+ // We allow same values for getters
1038
+ // See this: https://github.com/vuejs/vue/pull/7828#issuecomment-446820288
1039
+ if ( ( newVal === value && ! getter ) || ( newVal !== newVal && value !== value ) ) {
1038
1040
return
1039
1041
}
1040
1042
/* eslint-enable no-self-compare */
Original file line number Diff line number Diff line change @@ -1021,7 +1021,9 @@ function defineReactive$$1 (
1021
1021
set : function reactiveSetter ( newVal ) {
1022
1022
var value = getter ? getter . call ( obj ) : val ;
1023
1023
/* eslint-disable no-self-compare */
1024
- if ( newVal === value || ( newVal !== newVal && value !== value ) ) {
1024
+ // We allow same values for getters
1025
+ // See this: https://github.com/vuejs/vue/pull/7828#issuecomment-446820288
1026
+ if ( ( newVal === value && ! getter ) || ( newVal !== newVal && value !== value ) ) {
1025
1027
return
1026
1028
}
1027
1029
/* eslint-enable no-self-compare */
Original file line number Diff line number Diff line change @@ -1019,7 +1019,9 @@ function defineReactive$$1 (
1019
1019
set : function reactiveSetter ( newVal ) {
1020
1020
var value = getter ? getter . call ( obj ) : val ;
1021
1021
/* eslint-disable no-self-compare */
1022
- if ( newVal === value || ( newVal !== newVal && value !== value ) ) {
1022
+ // We allow same values for getters
1023
+ // See this: https://github.com/vuejs/vue/pull/7828#issuecomment-446820288
1024
+ if ( ( newVal === value && ! getter ) || ( newVal !== newVal && value !== value ) ) {
1023
1025
return
1024
1026
}
1025
1027
/* eslint-enable no-self-compare */
Original file line number Diff line number Diff line change 1025
1025
set : function reactiveSetter ( newVal ) {
1026
1026
var value = getter ? getter . call ( obj ) : val ;
1027
1027
/* eslint-disable no-self-compare */
1028
- if ( newVal === value || ( newVal !== newVal && value !== value ) ) {
1028
+ // We allow same values for getters
1029
+ // See this: https://github.com/vuejs/vue/pull/7828#issuecomment-446820288
1030
+ if ( ( newVal === value && ! getter ) || ( newVal !== newVal && value !== value ) ) {
1029
1031
return
1030
1032
}
1031
1033
/* eslint-enable no-self-compare */
Original file line number Diff line number Diff line change 1153
1153
set : function reactiveSetter ( newVal ) {
1154
1154
var value = getter ? getter . call ( obj ) : val ;
1155
1155
/* eslint-disable no-self-compare */
1156
- if ( newVal === value || ( newVal !== newVal && value !== value ) ) {
1156
+ // We allow same values for getters
1157
+ // See this: https://github.com/vuejs/vue/pull/7828#issuecomment-446820288
1158
+ if ( ( newVal === value && ! getter ) || ( newVal !== newVal && value !== value ) ) {
1157
1159
return
1158
1160
}
1159
1161
/* eslint-enable no-self-compare */
Original file line number Diff line number Diff line change @@ -1161,7 +1161,9 @@ function defineReactive$$1 (
1161
1161
set : function reactiveSetter ( newVal ) {
1162
1162
var value = getter ? getter . call ( obj ) : val ;
1163
1163
/* eslint-disable no-self-compare */
1164
- if ( newVal === value || ( newVal !== newVal && value !== value ) ) {
1164
+ // We allow same values for getters
1165
+ // See this: https://github.com/vuejs/vue/pull/7828#issuecomment-446820288
1166
+ if ( ( newVal === value && ! getter ) || ( newVal !== newVal && value !== value ) ) {
1165
1167
return
1166
1168
}
1167
1169
/* eslint-enable no-self-compare */
You can’t perform that action at this time.
0 commit comments