You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The modern async - await syntax seems broken on Firefox while using a static resource library.
Please note that if I put the same code in to a LWC, it works well, but when I put it into a static resource, it's broken.
Steps to Reproduce
Create a simple static resource like this
consttest=async()=>{console.log('hello');};(async()=>{awaittest();console.log('This line is unreachable on Firefox');})();
From the LWC
import{LightningElement}from'lwc';importsampleLibfrom'@salesforce/resourceUrl/sampleLib'import{loadScript}from'lightning/platformResourceLoader'exportdefaultclassSampleCodeextendsLightningElement{constructor(){super();loadScript(this,sampleLib).then(()=>{//just do nothing})}}
Expected Results
The line of code after the await should be reachable.
Actual Results
The line of code after the await is unreachable on Firefox.
Browsers Affected
Firefox
Version
The latest version - 134.0 (aarch64)
The text was updated successfully, but these errors were encountered:
Thanks for reporting this issue! It looks like an issue with the resource loader module, not the LWC framework (this repo). To resolve your issue, I would recommend opening a Salesforce Stack Exchange question or a Salesforce case.
Description
The modern
async - await
syntax seems broken on Firefox while using a static resource library.Please note that if I put the same code in to a LWC, it works well, but when I put it into a static resource, it's broken.
Steps to Reproduce
Expected Results
The line of code after the
await
should be reachable.Actual Results
The line of code after the
await
is unreachable on Firefox.Browsers Affected
Firefox
Version
The latest version - 134.0 (aarch64)
The text was updated successfully, but these errors were encountered: