if you call the function
logEvent(category, action, name, value, customData, callback)
without parameter it shout gives an error.
(logConsoleError(‘Error while logging event: Parameters
category
andaction
must not be empty or filled with whitespaces’);
But it doesn’t. Because the line
trim(String(category))
returns 9 (the length of the word categorie) when categorie is empty
So the error will never been showed.
var category;
console.log(“String(category)).length:”,String(category).length); // gives String(category)).length: 9
testes in firefox 61.01 and windows 7