8000 *defensive* ... cause it did error once · TypeStrong/atom-typescript@e0e603e · GitHub
[go: up one dir, main page]

Skip to content

Commit e0e603e

Browse files
committed
*defensive* ... cause it did error once
1 parent ef410c6 commit e0e603e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/main/atom/autoCompleteProvider.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ exports.provider = {
102102
}
103103
else {
104104
var prefix = options.prefix;
105-
if (c.name.startsWith('$')) {
105+
if (c.name && c.name.startsWith('$')) {
106106
prefix = "$" + prefix;
107107
}
108108
return {

lib/main/atom/autoCompleteProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ export var provider: autocompleteplus.Provider = {
209209
// But the var is $foo
210210
// => so we would potentially end up replacing $foo with $$foo
211211
// Fix that:
212-
if (c.name.startsWith('$')) {
212+
if (c.name && c.name.startsWith('$')) {
213213
prefix = "$" + prefix;
214214
}
215215

0 commit comments

Comments
 (0)
0