Bug 1411622 - Check for null nodes when searching for image preview targets in the markupview
MozReview-Commit-ID: 8dHAEJ7CIoV
--- a/devtools/client/inspector/markup/markup.js
+++ b/devtools/client/inspector/markup/markup.js
@@ -515,17 +515,17 @@ MarkupView.prototype = {
_isImagePreviewTarget: Task.async(function* (target) {
// From the target passed here, let's find the parent MarkupContainer
// and ask it if the tooltip should be shown
if (this.isDragging) {
return false;
}
let parent = target, container;
- while (parent !== this.doc.body) {
+ while (parent) {
if (parent.container) {
container = parent.container;
break;
}
parent = parent.parentNode;
}
if (container instanceof MarkupElementContainer) {