Ok, got the error. It wasn't wicket but an required resource send an old version not having the expected var definition; I need to change to an typeof check since I cant seem to get this reliable. Thanks anyway.
Best, KB ----- Ursprüngliche Mail ----- > Von: "Sven Meier" > An: "users" <users@wicket.apache.org> > Gesendet: Donnerstag, 2. April 2020 17:56:53 > Betreff: Re: Wicket.Ajax.Call.processEvaluation // how to not get reference > errors in case one has to check for a var? > Hi Korbinian, > > Wicket just evaluates your JS, if you get a ReferenceError then surely > there's something wrong in your code. > > Are you sure you're looking on the correct source line? > > Have fun > > Sven > > > On 02.04.20 15:57, Korbinian Bachl wrote: >> Hi, >> >> i've added some JS to be exectued after AJAX but wicket always sees an error >> where none is: >> >> Wicket.Ajax: Wicket.Ajax.Call.processEvaluation: Exception evaluating >> javascript: ReferenceError: etCommerce is not defined, text: (function(){var >> p= >> { >> ... >> } >> if(etCommerce) { etCommerce.sendEvent('insertToBasket', product, 1); }})(); >> >> Here we get an error that etCommerce is not defined - thats right but it is >> checked for it with "if(etCommerce)", so its perfectly valid JS? >> >> Also if I user if(etCommerce !== 'undefined') nothing changes as well, error >> stays?!? >> >> How can I get rid of these console alarms? And why is this also done in >> production mode? >> >> Best, >> >> KB >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org