Skip to content

Commit

Permalink
fix: Fix component refs (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuelmutschlechner authored and Akryum committed Jan 25, 2019
1 parent 295a4b8 commit 8588154
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -687,12 +687,9 @@ function processState (instance) {
*/

function processRefs (instance) {
if (Object.keys(instance.$refs).length === 0) {
return []
}
console.log(instance.$refs)
let refs = Object.keys(instance.$refs).map(key => getCustomRefDetails(instance, key, instance.$refs[key]))
return refs.length > 0 ? refs : []
return Object.keys(instance.$refs)
.filter(key => instance.$refs[key])
.map(key => getCustomRefDetails(instance, key, instance.$refs[key]))
}

/**
Expand Down

0 comments on commit 8588154

Please sign in to comment.