File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ module.exports = {
257257 const properties = node . arguments [ 0 ] . properties
258258 if ( ! properties ) return
259259 for ( const element of properties ) {
260- if ( element . key . name === 'initData' ) {
260+ if ( element . key && element . key . name === 'initData' ) {
261261 hasInitData = 1
262262 }
263263 }
@@ -276,17 +276,17 @@ module.exports = {
276276 Array . isArray ( node . properties )
277277 if ( isinit ) {
278278 for ( const item of node . properties ) {
279- if ( item . key . name === 'initData' ) {
279+ if ( item . key && item . key . name === 'initData' ) {
280280 handleInitData ( item . value . properties , propsSet )
281281 }
282282 }
283283 }
284284 } ,
285285 Property ( node ) {
286- if ( node . key . name === 'computed' ) {
286+ if ( node . key && node . key . name === 'computed' ) {
287287 commonFunction ( node . value , computedSet )
288288 }
289- if ( node . key . name === 'initData' ) {
289+ if ( node . key && node . key . name === 'initData' ) {
290290 const isCreate =
291291 node . parent . parent . callee &&
292292 node . parent . parent . callee . name === 'createComponent'
You can’t perform that action at this time.
0 commit comments