Skip to content

Commit ce99b72

Browse files
committed
getComputedProperties should support spead operator
1 parent 3636c7b commit ce99b72

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/utils/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ module.exports = {
340340
const computedProperties = computedPropertiesNode.value.properties
341341

342342
return computedProperties.map(cp => {
343+
if (cp.type !== 'Property') return {}
344+
343345
const key = cp.key.name
344346
let value
345347

@@ -357,5 +359,6 @@ module.exports = {
357359

358360
return { key, value }
359361
})
362+
.filter(cp => cp.value)
360363
}
361364
}

0 commit comments

Comments
 (0)