How do I properly do object detection for window.performance.timing
?
An unknown version of Chrome being run by Googlebot is spawning the following error:
Uncaught TypeError: Cannot read property 'timing' of undefined
The only instances of window.performance.timing
are in the following snippets of code:
else if (
window.performance!=undefined
&& window.performance.timing!=undefined
&& window.performance.timing.toJSON!=undefined) {/* etc */}
Obviously regardless of my efforts to do object detection Googlebot is somehow still spawning the error message. I can not use try
and catch
and I have zero instances in my JavaScript error log of this happening in any testable (e.g. Chrome itself) browser, only Googlebot.