Skip to content

Commit

Permalink
fix: bug update admin
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslabbe committed Nov 25, 2016
1 parent 03e9b01 commit b2b4ab0
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/cli/cms/editor/handlebars/sourceAttr.js
Expand Up @@ -46,14 +46,16 @@ function isSelected(currentValue, values) {
var isEqual = false
if(typeof currentValue === 'object' && Object.prototype.toString.call(currentValue) === '[object Object]') {
Array.prototype.forEach.call(values, (value) => {
var checkAllEqual = false
Array.prototype.forEach.call(Object.keys(value), (key) => {
if (currentValue[key] != null && currentValue[key] == value[key] && checkAllEqual == false) {
checkAllEqual = true
if (value != null) {
var checkAllEqual = false
Array.prototype.forEach.call(Object.keys(value), (key) => {
if (currentValue[key] != null && currentValue[key] == value[key] && checkAllEqual == false) {
checkAllEqual = true
}
})
if (checkAllEqual) {
isEqual = true
}
})
if (checkAllEqual) {
isEqual = true
}
})
}else {
Expand Down

0 comments on commit b2b4ab0

Please sign in to comment.