Open AndradeAlbuquerque opened 3 years ago
The same happens when using the elvis operator i.e., optional chaining (?.)
I am having the same issue, and worked around it by using old-school null handling for now, but it would be great to know if this is something that might be resolved, as I'm in the process of moving all my bundling over to use this extension.
Still doesn't work 1y later
I am also trying optional chaining operator ('?.') and arrow functions ('() => {}') but getting a syntax error on compile to a bundle. Still now fixed so will have to revert to old JavaScript syntax.
Installed product versions
Description
It seems it is not possible to Bundle & Minify javascript files containing the nullish coalescing operator ('??') because it generates the error "(Bundler & Minifier) Object reference not set to an instance of an object."
Steps to recreate
let otherurl = null;
let userOptions = { parameter1: 'this is my parameter 1' };
let options = {
url: otherurl ?? '/myurl',
parameter: userOptions?.parameter1 ?? ''
};