Skip to content

Commit 8588154

Browse files
emanuelmutschlechnerAkryum
authored andcommitted
fix: Fix component refs (#814)
1 parent 295a4b8 commit 8588154

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/backend/index.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -687,12 +687,9 @@ function processState (instance) {
687687
*/
688688

689689
function processRefs (instance) {
690-
if (Object.keys(instance.$refs).length === 0) {
691-
return []
692-
}
693-
console.log(instance.$refs)
694-
let refs = Object.keys(instance.$refs).map(key => getCustomRefDetails(instance, key, instance.$refs[key]))
695-
return refs.length > 0 ? refs : []
690+
return Object.keys(instance.$refs)
691+
.filter(key => instance.$refs[key])
692+
.map(key => getCustomRefDetails(instance, key, instance.$refs[key]))
696693
}
697694

698695
/**

0 commit comments

Comments
 (0)