Skip to content

Commit 62dc3d3

Browse files
committed
修复一个小错误
1 parent 75bb94d commit 62dc3d3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

autoload/phpcd.vim

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1085,9 +1085,11 @@ function! phpcd#GetCurrentNameSpace(file_lines) " {{{
10851085
let nsuse = rpcrequest(g:phpcd_channel_id, 'nsuse', expand('%:p'))
10861086

10871087
let imports = {}
1088-
for [alias, fqdn] in items(nsuse.imports)
1089-
let imports[alias] = {'name': fqdn, 'kind': ''}
1090-
endfor
1088+
if len(nsuse.imports) > 0
1089+
for [alias, fqdn] in items(nsuse.imports)
1090+
let imports[alias] = {'name': fqdn, 'kind': ''}
1091+
endfor
1092+
endif
10911093

10921094
return [nsuse.namespace, imports]
10931095
endfunction " }}}

0 commit comments

Comments
 (0)