Skip to content

Commit b534704

Browse files
committed
fix: error when dataKey value is 0
1 parent e6d1810 commit b534704

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

dist/virtual-list.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-virtual-sortable v2.0.1
2+
* vue-virtual-sortable v2.0.2
33
* open source under the MIT license
44
* https://github.com/mfuu/vue-virtual-sortable#readme
55
*/
@@ -1059,7 +1059,7 @@
10591059
return result;
10601060
}
10611061
function isSameValue(a, b) {
1062-
return a == b;
1062+
return a === 0 ? a === b : a == b;
10631063
}
10641064
function getDataKey(item, dataKey) {
10651065
return (!Array.isArray(dataKey) ? dataKey.replace(/\[/g, '.').replace(/\]/g, '.').split('.') : dataKey).reduce(function (o, k) {

dist/virtual-list.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"name": "vue-virtual-sortable",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "A virtual scrolling list component that can be sorted by dragging",
55
"main": "dist/virtual-list.min.js",
66
"files": [
77
"dist"
88
],
99
"scripts": {
1010
"build": "rollup --config",
11+
"publish": "npm publish",
1112
"core:update": "git submodule update --remote",
1213
"docs:dev": "vuepress dev docs --temp .temp",
1314
"docs:build": "vuepress build docs"

src/core

Submodule core updated 1 file

0 commit comments

Comments
 (0)