8000 [release] 0.12.12 · Burhh/vue@bf8e371 · GitHub
[go: up one dir, main page]

Skip to content

Commit bf8e371

Browse files
committed
[release] 0.12.12
1 parent 850646f commit bf8e371

File tree

3 files changed

+34
-27
lines changed

3 files changed

+34
-27
lines changed

dist/vue.js

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* Vue.js v0.12.11
2+
* Vue.js v0.12.12
33
* (c) 2015 Evan You
44
* Released under the MIT License.
55
*/
@@ -459,6 +459,25 @@ return /******/ (function(modules) { // webpackBootstrap
459459
return cb
460460
}
461461

462+
/**
463+
* Check if two values are loosely equal - that is,
464+
* if they are plain objects, do they have the same shape?
465+
*
466+
* @param {*} a
467+
* @param {*} b
468+
* @return {Boolean}
469+
*/
470+
471+
exports.looseEqual = function (a, b) {
472+
/* eslint-disable eqeqeq */
473+
return a == b || (
474+
exports.isObject(a) && exports.isObject(b)
475+
? JSON.stringify(a) === JSON.stringify(b)
476+
: false
477+
)
478+
/* eslint-enable eqeqeq */
479+
}
480+
462481

463482
/***/ },
464483
/* 3 */
@@ -6215,9 +6234,7 @@ return /******/ (function(modules) { // webpackBootstrap
62156234
},
62166235

62176236
update: function (value) {
6218-
/* eslint-disable eqeqeq */
6219-
this.el.checked = value == this.getValue()
6220-
/* eslint-enable eqeqeq */
6237+
this.el.checked = _.looseEqual(value, this.getValue())
62216238
}
62226239
}
62236240

@@ -6293,7 +6310,7 @@ return /******/ (function(modules) { // webpackBootstrap
62936310
/* eslint-disable eqeqeq */
62946311
op.selected = multi
62956312
? indexOf(value, val) > -1
6296-
: equals(value, val)
6313+
: _.looseEqual(value, val)
62976314
/* eslint-enable eqeqeq */
62986315
}
62996316
},
@@ -6450,29 +6467,19 @@ return /******/ (function(modules) { // webpackBootstrap
64506467
function indexOf (arr, val) {
64516468
var i = arr.length
64526469
while (i--) {
6453-
if (equals(arr[i], val)) {
6470+
if (_.looseEqual(arr[i], val)) {
64546471
return i
64556472
}
64566473
}
64576474
return -1
64586475
}
64596476

6460-
/**
6461-
* Check if two values are loosely equal. If two objects
6462-
* have the same shape, they are considered equal too:
6463-
* equals({a: 1}, {a: 1}) => true
6464-
*/
6465-
6466-
function equals (a, b) {
6467-
/* eslint-disable eqeqeq */
6468-
return a == b || JSON.stringify(a) == JSON.stringify(b)
6469-
/* eslint-enable eqeqeq */
6470-
}
6471-
64726477

64736478
/***/ },
64746479
/* 44 */
6475-
/***/ function(module, exports) {
6480+
/***/ function(module, exports, __webpack_require__) {
6481+
6482+
var _ = __webpack_require__(1)
64766483

64776484
module.exports = {
64786485

@@ -6483,11 +6490,11 @@ return /******/ (function(modules) { // webpackBootstrap
64836490
var falseExp = this._checkParam('false-exp')
64846491

64856492
this._matchValue = function (value) {
6486-
var trueValue = true
64876493
if (trueExp !== null) {
6488-
trueValue = self.vm.$eval(trueExp)
6494+
return _.looseEqual(value, self.vm.$eval(trueExp))
6495+
} else {
6496+
return !!value
64896497
}
6490-
return trueValue === value
64916498
}
64926499

64936500
function getValue () {

0 commit comments

Comments
 (0)
0