Bug 1251767 - Add WS filter button to net panel. Follow-up: Use multiple lines for code if necessary to not have more than 80 characters on a line and make eslint happy. r=follow-the-rule-of-eslint

This commit is contained in:
Sebastian Hengst 2016-03-22 00:42:23 +01:00
Родитель e90bd4aabb
Коммит fd82225d94
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -1287,13 +1287,15 @@ RequestsMenuView.prototype = Heritage.extend(WidgetMethods, {
// If no header found on request, check response - mainly to get
// something we can unit test, as it is impossible to set
// the Upgrade header on outgoing XHR as per the spec.
if (!upgradeHeader && responseHeaders && Array.isArray(responseHeaders.headers)) {
if (!upgradeHeader && responseHeaders &&
Array.isArray(responseHeaders.headers)) {
upgradeHeader = responseHeaders.headers.find(header => {
return (header.name == "Upgrade");
});
}
// Return false if there is no such header or if its value isn't 'websocket'.
// Return false if there is no such header or if its value isn't
// 'websocket'.
if (!upgradeHeader || upgradeHeader.value != "websocket") {
return false;
}