amphtml: Error: null is not an object (evaluating 'new a.Image')
Error: null is not an object (evaluating 'new a.Image')
at Image (https://raw.githubusercontent.com/ampproject/amphtml/1908121824440/src/window-interface.js:95)
at iframe (https://raw.githubusercontent.com/ampproject/amphtml/1908121824440/src/pixel.js:61)
at win (https://raw.githubusercontent.com/ampproject/amphtml/1908121824440/extensions/amp-analytics/0.1/transport.js:246)
at (https://raw.githubusercontent.com/ampproject/amphtml/1908121824440/extensions/amp-analytics/0.1/transport.js:132)
at requestUrl (https://raw.githubusercontent.com/ampproject/amphtml/1908121824440/extensions/amp-analytics/0.1/requests.js:260)
My guess is the window
is destroyed by the time Transport.sendRequest
is called. A null check may fix it.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (17 by maintainers)
Ah so we pass in param by reference, makes sense. I’ll create a quick fix.
The reason why it’s hard to notice is probably b/c of the
const Image = WindowInterface.getImage(win)
in the:It most likely gets inlined by the compiler, thus simply becoming:
Have we tried doing this?