Javascript namespace error
In PHPStorm (2017.2.4) I am using the "Copy reference" function quite a lot using the CTRL+SHIFT+ALT+C combination and noticed the reference is not picked up correcftly. Since at least the 2017 version.
Example class.
var BPN = BPN || {};
BPN.components = BPN.components || {};
BPN.components.Views = BPN.components.Views || {};
BPN.components.Views.MyObject = {
myFunc: function (){
return 'something';
}
};
When trying to get the reference of myFunc in BPN.components.Views.MyObject, I expect to get
BPN.components.Views.MyObject.myFunc
Instead I get returned:
BPN.Views.components.MyObject.myFunc
Could you please fix this?
Please sign in to leave a comment.
Could you please submit this to the issue tracker?
https://youtrack.jetbrains.com/newIssue?project=WEB (it's a WebStorm issue, that's why the link takes you there)
Thank you!
Submitted to https://youtrack.jetbrains.com/issue/WI-38459