diff --git a/devtools/client/netmonitor/src/request-list-context-menu.js b/devtools/client/netmonitor/src/request-list-context-menu.js index de6eee992b86..6b1e53b8fdde 100644 --- a/devtools/client/netmonitor/src/request-list-context-menu.js +++ b/devtools/client/netmonitor/src/request-list-context-menu.js @@ -126,8 +126,8 @@ RequestListContextMenu.prototype = { label: L10N.getStr("netmonitor.context.copyImageAsDataUri"), accesskey: L10N.getStr("netmonitor.context.copyImageAsDataUri.accesskey"), visible: !!(selectedRequest && - selectedRequest.responseContent && - selectedRequest.responseContent.content.mimeType.includes("image/")), + selectedRequest.mimeType && + selectedRequest.mimeType.includes("image/")), click: () => this.copyImageAsDataUri(), }); @@ -164,8 +164,8 @@ RequestListContextMenu.prototype = { label: L10N.getStr("netmonitor.context.saveImageAs"), accesskey: L10N.getStr("netmonitor.context.saveImageAs.accesskey"), visible: !!(selectedRequest && - selectedRequest.responseContent && - selectedRequest.responseContent.content.mimeType.includes("image/")), + selectedRequest.mimeType && + selectedRequest.mimeType.includes("image/")), click: () => this.saveImageAs(), }); @@ -200,8 +200,8 @@ RequestListContextMenu.prototype = { label: L10N.getStr("netmonitor.context.openInDebugger"), accesskey: L10N.getStr("netmonitor.context.openInDebugger.accesskey"), visible: !!(selectedRequest && - selectedRequest.responseContent && - selectedRequest.responseContent.content.mimeType.includes("javascript")), + selectedRequest.mimeType && + selectedRequest.mimeType.includes("javascript")), click: () => this.openInDebugger() }); @@ -210,9 +210,9 @@ RequestListContextMenu.prototype = { label: L10N.getStr("netmonitor.context.openInStyleEditor"), accesskey: L10N.getStr("netmonitor.context.openInStyleEditor.accesskey"), visible: !!(selectedRequest && - selectedRequest.responseContent && Services.prefs.getBoolPref("devtools.styleeditor.enabled") && - selectedRequest.responseContent.content.mimeType.includes("css")), + selectedRequest.mimeType && + selectedRequest.mimeType.includes("css")), click: () => this.openInStyleEditor() });