Hi Sven,

yes, I am sure. I can give you the url to an example live app if you like. 
Wicket logs this error at the console level, yet the browser detects no error 
in execution at all... 

I mean if you look at the code below, you see the reference error to the 
etCommerce variable, but i got an if(etCommerce) check beforehand?

Best,

KB

----- Ursprüngliche Mail -----
> Von: "Sven Meier" <s...@meiers.net>
> 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

Reply via email to