Skip to content

Commit

Permalink
#5 Fix: null pointer on JSRootConfiguration.getInstance
Browse files Browse the repository at this point in the history
  • Loading branch information
klesun-itn committed Oct 9, 2018
1 parent d27728f commit 37a68ba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin>
<id>lv.midiana.misc.idea-plugins.deep-js-completion</id>
<name>deep-js-completion</name>
<version>2018.09.14.001</version>
<version>2018.10.09.001</version>
<vendor email="safronevev@gmail.com" url="http://midiana.lv/entry/deep-js-completion">Klesun</vendor>

<description><![CDATA[
Expand All @@ -26,7 +26,7 @@ This plugin will be highly inspired by my other plugin, <a href="https://plugins
]]></description>

<change-notes><![CDATA[
<li>Fix: null pointer on parameters.getOriginalPosition</li>
<li>Fix: null pointer on JSRootConfiguration.getInstance</li>
]]>
</change-notes>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ class DeepKeysPvdr extends CompletionProvider[CompletionParameters] {

val nameToLookup = ListMap(suggestions.map(t => t.getLookupString -> t) : _*)
val builtInSuggestions = new util.ArrayList[LookupElement]
val onlyTyped = JSRootConfiguration.getInstance(psi.getProject).isOnlyTypeBasedCompletion
val jsConfig = JSRootConfiguration.getInstance(psi.getProject)
var onlyTyped = false
if (jsConfig != null) {
onlyTyped = jsConfig.isOnlyTypeBasedCompletion
}

result.runRemainingContributors(parameters, otherSourceResult => {
val lookup = otherSourceResult.getLookupElement
Expand Down

0 comments on commit 37a68ba

Please sign in to comment.