Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 477014

Summary: Error retrieving content assist proposals
Product: [ECD] Orion Reporter: guji muun <gujiman>
Component: JS ToolsAssignee: Michael Rennie <Michael_Rennie>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: Michael_Rennie
Version: 10.0   
Target Milestone: 10.0   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description guji muun CLA 2015-09-09 20:13:44 EDT
Goto orionhub.org and paste the js code bellow (without {cntrl-space here}):

var p = {cntrl-space here}
function foo(){
	
}


i get the following console error:
Error retrieving content assist proposals
contentAssist.js:311 TypeError: Cannot read property 'kind' of null


The possible fix for this error is to open ternAssist.js, locate the following:

	function createDocProposals(params, kind, ast, buffer, pluginenvs) {
	    var proposals = [];
	    if(typeof(kind) !== 'object') {
	    	return proposals;
	    }

and add:
	    if(kind === null) {
	    	return proposals;
	    }
Comment 1 Michael Rennie CLA 2015-09-10 11:11:19 EDT
Good find!

Not sure how this case slipped through the tests.

Fix + test: 

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=c69bf24f63635a81d0a2c970af4f8c47984aa933