I am attempting to load a third-party Javascript library into a Lightning Component. The third-party assures me that the code is valid under "Strict Mode" and I have no reason to doubt them as this is a widely-used library.
HOWEVER, when I attempt to load the library I get the following error from the console in Chrome:
WARNING: Failed to load script at /resource/1587586407000/PCMilerJavascript: Delete of an unqualified identifier in strict mode. [Delete of an unqualified identifier in strict mode.]
Here is the the offending part of my js file:
import { LightningElement, api, wire } from 'lwc';
import { loadStyle, loadScript } from 'lightning/platformResourceLoader';
// apex methods
import getCredentials from '@salesforce/apex/ALKMapController2.getCredentials';
// static resources
import PCMilerCSS from '@salesforce/resourceUrl/PCMilerCSS';
import PCMilerJavascript from '@salesforce/resourceUrl/PCMilerJavascript';
export default class AlkMap extends LightningElement {
connectedCallback() {
debugger;
Promise.all([loadStyle(this, PCMilerCSS), loadScript(this, PCMilerJavascript)])
.then(() => {
debugger;
this.initializeMap();
})
.catch(error => {
debugger;
LightningUtil.logError(this, error);
});
}
The load of the Javascript is attempted in connectedCallback and fails as noted above.
Again the third-party assures me that their file passes strict mode.
Thanks in advance for your help!