Open sc5148 opened 5 years ago
Happens to me also on v46.5.0. Whenever my mouse goes over the code for creating a force:createRecord event, this error shows in the Output
[Error - 1:18:49 PM] TypeError: Cannot read property 'charCodeAt' of undefined
at isInteger (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/infer.js:547:18)
at exports.Obj.hasProp (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/infer.js:581:11)
at findExprType (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:914:28)
at findTypeAtExpr (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:927:16)
at Object.findTypeAt [as run] (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:951:22)
at run (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:275:59)
at /my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:278:16
at Object.exports.withContext (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/infer.js:883:18)
at /my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:274:13
at analyzeAll (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:404:15)
TypeError: Cannot read property 'charCodeAt' of undefined
at isInteger (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/infer.js:547:18)
at exports.Obj.hasProp (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/infer.js:581:11)
at findExprType (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:914:28)
at findTypeAtExpr (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:927:16)
at Object.findTypeAt [as run] (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:951:22)
at run (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:275:59)
at /my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:278:16
at Object.exports.withContext (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/infer.js:883:18)
at /my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:274:13
at analyzeAll (/my_file_path/.vscode/extensions/salesforce.salesforcedx-vscode-lightning-46.5.0/node_modules/aura-language-server/lib/tern/lib/tern.js:404:15)
@ntotten Hey any ETA for this bug fix?
@ntotten I've been experiencing the same bug for a while now and have come across this issue, but don't want to open another for the same. Is this being looked into? There was no response to @sc5148 for an ETA.
In case it's helpful to anyone else while we're waiting on a fix, I updated the isInteger function in infer.js to the following and it seems to have suppressed the error:
function isInteger(str)
{
if (typeof str !== "undefined")
{
var c0 = str.charCodeAt(0);
if (c0 >= 48 && c0 <= 57) return !/\D/.test(str);
}
return false;
}
The associated work item is W-6161498
I am facing an issue on my lightning component in the part which dynamically creates another component based on
Whenever I hover the mouse over SObjectName the output panel opens up and shows this error message: Cannot read property 'charCodeAt' of undefined at isInteger
Same thing happens for this piece of code:
Hovering mouse over any of the variant,title or message opens the output panel and shows the error. I have recorded a video for the same.