Closed retinafunk closed 3 years ago
I noticed a small bug when the JS snippets inserted in NEOS Inspector are minified, that Javascript String Template Literals in JS snippets are missing the Variables/ expression interpolations . I mean the ${jsExpression} in const str = ... ${}
... ${}
So for example.
const mapSrc = https://maps.google.de/maps?hl=de&q=${companyName}+${zip}+${city}&ie=UTF8&t=&z=17&iwloc=B&output=embed;
https://maps.google.de/maps?hl=de&q=${companyName}+${zip}+${city}&ie=UTF8&t=&z=17&iwloc=B&output=embed
is minfied to :
const mapSrc = https://maps.google.de/maps?hl=de&q={}+{}+{}&ie=UTF8&t=&z=17&iwloc=B&output=embed;
https://maps.google.de/maps?hl=de&q={}+{}+{}&ie=UTF8&t=&z=17&iwloc=B&output=embed
instead of :
const mapSrc = https://maps.google.de/maps?hl=de&q=PERMANENT+40219+Duesseldorf&ie=UTF8&t=&z=17&iwloc=B&output=embed;
https://maps.google.de/maps?hl=de&q=PERMANENT+40219+Duesseldorf&ie=UTF8&t=&z=17&iwloc=B&output=embed
A workaround was to use traditional JS String concat . SO this works:
const mapSrc = 'https://maps.google.de/maps?hl=de&q='+companyName+'+'+zip+'+'+city+'&ie=UTF8&t=&z=17&iwloc=B&output=embed';
Thanks for your issue report. Will check it and provide a Bugfix 🙂
Bugfix will be available in the next version. Will release it the next days.
I noticed a small bug when the JS snippets inserted in NEOS Inspector are minified, that Javascript String Template Literals in JS snippets are missing the Variables/ expression interpolations . I mean the ${jsExpression} in const str =
... ${}
So for example.
const mapSrc =
https://maps.google.de/maps?hl=de&q=${companyName}+${zip}+${city}&ie=UTF8&t=&z=17&iwloc=B&output=embed
;is minfied to :
const mapSrc =
https://maps.google.de/maps?hl=de&q={}+{}+{}&ie=UTF8&t=&z=17&iwloc=B&output=embed
;instead of :
const mapSrc =
https://maps.google.de/maps?hl=de&q=PERMANENT+40219+Duesseldorf&ie=UTF8&t=&z=17&iwloc=B&output=embed
;A workaround was to use traditional JS String concat . SO this works:
const mapSrc = 'https://maps.google.de/maps?hl=de&q='+companyName+'+'+zip+'+'+city+'&ie=UTF8&t=&z=17&iwloc=B&output=embed';