Skip to content

Commit 4cd44b2

Browse files
author
Damian Dulisz
committed
Bump version to beta-15
1 parent 63879c4 commit 4cd44b2

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

lib/multiselectMixin.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,12 +257,15 @@ exports.default = {
257257
this.$emit('search-change', this.search, this.id);
258258
},
259259
'value': function value(_value) {
260-
this.internalValue = (0, _utils2.default)(Array.isArray(_value) ? _value : [_value]);
260+
this.internalValue = this.getInternalValue(_value);
261261
}
262262
},
263263
methods: {
264264
getValue: function getValue() {
265-
return this.multiple ? (0, _utils2.default)(this.internalValue) : (0, _utils2.default)(this.internalValue[0]);
265+
return this.multiple ? (0, _utils2.default)(this.internalValue) : this.internalValue.length === 0 ? null : (0, _utils2.default)(this.internalValue[0]);
266+
},
267+
getInternalValue: function getInternalValue(value) {
268+
return value === null || value === undefined ? [] : this.multiple ? (0, _utils2.default)(value) : (0, _utils2.default)([value]);
266269
},
267270
filterAndFlat: function filterAndFlat(options) {
268271
return flow(filterGroups(this.search, this.label, this.groupValues, this.groupLabel), flattenOptions(this.groupValues, this.groupLabel))(options);

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-multiselect",
3-
"version": "2.0.0-beta.14",
3+
"version": "2.0.0-beta.15",
44
"description": "Multiselect component for vue.js",
55
"author": "Damian Dulisz <damian.dulisz@monterail.com>",
66
"private": false,
@@ -25,7 +25,7 @@
2525
"unit": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --watch",
2626
"test": "cross-env BABEL_ENV=test karma start test/unit/karma.conf.js --single-run",
2727
"lint": "eslint --ext .js,.vue src test/unit/specs",
28-
"finish": "npm run lint && npm test && npm run build"
28+
"finish": "npm run lint && npm test && npm run bundle"
2929
},
3030
"devDependencies": {
3131
"autoprefixer": "^6.7.2",

0 commit comments

Comments
 (0)