Permalink
Browse files

Filter [object XRayWrapper *] decoration out.

  • Loading branch information...
neonux committed Apr 2, 2012
1 parent 7ef1c11 commit 8639f36fd06820a3512e56ccc7ff76290e8901ed
Showing with 4 additions and 1 deletion.
  1. +4 −1 content/LiveEvaluatorUI.jsm
@@ -48,6 +48,8 @@ const QUOTED_STRING_RE = /^["'].*["']$/;
const DEADCODE_ANNOTATION = "scratchpad.deadcode";
const LIVE_FUNCTION_ANNOTATION = "scratchpad.livefunction";
+const XRAY_DECORATION_RE = /^\[object XrayWrapper (.*)\]$/;
+
/**
* LiveEvaluatorUI constructor.
*
@@ -595,7 +597,8 @@ ObjectRepresenter.prototype =
if (Object.prototype.toString.call(aValue) == "[object Array]") {
aValueContainer.textContent = "[" + (aValue.length ? "..." : "") + "]";
} else {
- aValueContainer.textContent = aValue.toString();
+ let value = aValue.toString();
+ aValueContainer.textContent = value.replace(XRAY_DECORATION_RE, "$1");
}
aValueContainer.addEventListener("click", this._onClickBinding, false);
return true;

0 comments on commit 8639f36

Please sign in to comment.