Skip to content

Commit

Permalink
Fix issue with structured palette
Browse files Browse the repository at this point in the history
  • Loading branch information
sylvainjule committed Apr 11, 2020
1 parent d460b0d commit 290da47
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"recognizeSelfClosing": true
},
"devDependencies": {
"@vue/component-compiler-utils": "^3.0.0",
"@vue/component-compiler-utils": "^3.1.2",
"cssnano": "^4.1.10",
"sass": "^1.21.0",
"vue-template-compiler": "^2.6.10"
"sass": "^1.26.3",
"vue-template-compiler": "^2.6.11"
},
"dependencies": {
"vue": "^2.6.10",
"vue": "^2.6.11",
"vue-hot-reload-api": "^2.3.4"
}
}
8 changes: 5 additions & 3 deletions src/components/field/ColorPalette.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ export default {
let aKeys = Object.keys(a);
let bKeys = Object.keys(b);
// Make sure the selected option doesn't have its 'key' key
let keyIndex = aKeys.indexOf('key')
if(keyIndex !== -1) aKeys.splice(keyIndex, 1)
// Make sure to compare without the keys
let aKeyIndex = aKeys.indexOf('key')
if(aKeyIndex !== -1) aKeys.splice(aKeyIndex, 1)
let bKeyIndex = bKeys.indexOf('key')
if(bKeyIndex !== -1) bKeys.splice(bKeyIndex, 1)
// Different keys? not equivalent
if (aKeys.length != bKeys.length) {
Expand Down

0 comments on commit 290da47

Please sign in to comment.