Skip to content

Commit

Permalink
Clean up wrapping on console $
Browse files Browse the repository at this point in the history
  • Loading branch information
sroussey committed Oct 2, 2012
1 parent d8eca50 commit 0f8b98d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions extension/content/firebug/console/commandLine.js
Expand Up @@ -1059,11 +1059,10 @@ function FirebugCommandLineAPI(context)
return start.querySelector(selector); return start.querySelector(selector);
} }


result = Wrapper.unwrapObject(context.baseWindow.document).querySelector(selector); result = context.baseWindow.document.querySelector(selector);
if (result == null && (selector||"")[0] !== "#") if (result == null && (selector||"")[0] !== "#")
{ {
result = Wrapper.unwrapObject(context.baseWindow.document).querySelector("#" + selector); if (context.baseWindow.document.getElementById(selector))
if (result != null)
{ {
// This should be removed in the next minor (non-bugfix) version // This should be removed in the next minor (non-bugfix) version
var msg = Locale.$STRF("warning.dollar_change", [selector]); var msg = Locale.$STRF("warning.dollar_change", [selector]);
Expand All @@ -1081,7 +1080,7 @@ function FirebugCommandLineAPI(context)
result = start.querySelectorAll(selector); result = start.querySelectorAll(selector);
} }
else else
result = Wrapper.unwrapObject(context.baseWindow.document).querySelectorAll(selector); result = context.baseWindow.document.querySelectorAll(selector);
return Arr.cloneArray(result); return Arr.cloneArray(result);
}; };


Expand Down

0 comments on commit 0f8b98d

Please sign in to comment.