Index: third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
index 1d8c9e908240c816daa3c884ecc2c942f3d0425d..17bab00c98257cdb27b4cc039338c38c2106d968 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
+++ b/third_party/WebKit/Source/devtools/front_end/sources/ScriptFormatterEditorAction.js |
@@ -222,9 +222,8 @@ WebInspector.ScriptFormatterEditorAction.prototype = { |
_toggleFormatScriptSource: function() |
{ |
var uiSourceCode = this._sourcesView.currentUISourceCode(); |
- if (!this._isFormatableScript(uiSourceCode)) |
- return; |
- this._formatUISourceCodeScript(uiSourceCode); |
+ if (this._isFormatableScript(uiSourceCode)) |
+ this._formatUISourceCodeScript(uiSourceCode); |
}, |
/** |
@@ -349,7 +348,7 @@ WebInspector.ScriptFormatterEditorAction.prototype = { |
return; |
} |
- uiSourceCode.requestContent(contentLoaded.bind(this)); |
+ uiSourceCode.requestContent().then(contentLoaded.bind(this)); |
/** |
* @this {WebInspector.ScriptFormatterEditorAction} |