Index: Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
diff --git a/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js b/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
index 9cbc5d045f67fdff59bcfee058ed242f287229e0..742e37e20219c7a2f4d00f8995136dbea8122d87 100644 |
--- a/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
+++ b/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
@@ -231,7 +231,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = { |
this._button = new WebInspector.StatusBarButton(WebInspector.UIString("Pretty print"), "sources-toggle-pretty-print-status-bar-item"); |
this._button.toggled = false; |
this._button.addEventListener("click", this._toggleFormatScriptSource, this); |
- this._updateButton(null); |
+ this._updateButton(sourcesView.currentUISourceCode()); |
return this._button.element; |
}, |