Index: third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
index b13cba16ae6aa0fe394a2587c4ddd6e24ac00e85..27a87fafa85ea8082e5cafd6d861ed2ad046024e 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
+++ b/third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js |
@@ -459,15 +459,16 @@ WebInspector.StylesSidebarPane.prototype = { |
{ |
if (!styleSheetHeader) |
return; |
- styleSheetHeader.requestContent(onStyleSheetContent.bind(this, styleSheetHeader.id)); |
+ styleSheetHeader.requestContent().then(onStyleSheetContent.bind(this, styleSheetHeader.id)); |
/** |
* @param {string} styleSheetId |
- * @param {string} text |
+ * @param {?string} text |
* @this {WebInspector.StylesSidebarPane} |
*/ |
function onStyleSheetContent(styleSheetId, text) |
{ |
+ text = text || ""; |
var lines = text.split("\n"); |
var range = WebInspector.TextRange.createFromLocation(lines.length - 1, lines[lines.length - 1].length); |
this._addBlankSection(this._sectionBlocks[0].sections[0], styleSheetId, range); |