Open freaktiful opened 4 years ago
When trying this widget in firefox, an error in particular (ReferenceError) does not show the error line. It does in chrome, though.
When inspecting the problem, it seems that in Firefox, the filename returned is not only the page URL, but said URL and more text.
Thus, in preview-frame.bundle.js, when checking:
if (typeof (e.lineno) === 'number' && (e.filename === '' || e.filename === window.location.href)) { line = e.lineno; }
It never satisfies the condition, and the variable line remains undefined.
I've changed (in my local code) the condition to:
(typeof (e.lineno) === 'number' && (e.filename === '' || e.filename === window.location.href || e.filename.includes(window.location.href)))
and it seems to work correctly.
When trying this widget in firefox, an error in particular (ReferenceError) does not show the error line. It does in chrome, though.
When inspecting the problem, it seems that in Firefox, the filename returned is not only the page URL, but said URL and more text.
Thus, in preview-frame.bundle.js, when checking:
It never satisfies the condition, and the variable line remains undefined.
I've changed (in my local code) the condition to:
and it seems to work correctly.