Bug 1471779 - Use the correct operator when checking if it's a grid or inline grid for toggling the display badges. r=pbro draft
authorGabriel Luong <gabriel.luong@gmail.com>
Wed, 27 Jun 2018 21:17:37 -0400
changeset 811708 06bfad062e4c60c30fb864c7fd6dc1b16a2f91da
parent 811683 b8a8cac376ca7d7447f59f9e6c3df3b45f8a10c2
push id114396
push userbmo:gl@mozilla.com
push dateThu, 28 Jun 2018 01:18:04 +0000
reviewerspbro
bugs1471779
milestone63.0a1
Bug 1471779 - Use the correct operator when checking if it's a grid or inline grid for toggling the display badges. r=pbro MozReview-Commit-ID: KkpsUuwlWVH
devtools/client/inspector/markup/views/element-editor.js
--- a/devtools/client/inspector/markup/views/element-editor.js
+++ b/devtools/client/inspector/markup/views/element-editor.js
@@ -643,17 +643,17 @@ ElementEditor.prototype = {
   /**
    * Called when the display badge is clicked. Toggles on the grid highlighter for the
    * selected node if it is a grid container.
    */
   onDisplayBadgeClick: function(event) {
     event.stopPropagation();
 
     const target = event.target;
-    if (target.dataset.display !== "grid" || target.dataset.display !== "inline-grid") {
+    if (target.dataset.display !== "grid" && target.dataset.display !== "inline-grid") {
       return;
     }
 
     this.highlighters.toggleGridHighlighter(this.inspector.selection.nodeFront, "markup");
   },
 
   /**
    * Called when the tag name editor has is done editing.