Bug 1672777 - [devtools] Only try to replace the mime-type when it is available r=Honza
authorHubert Boma Manilla <hmanilla@mozilla.com>
Sun, 25 Oct 2020 09:13:26 +0000
changeset 554352 ee8ad6205433e088a716f5f4f4b36f10d2ca5d66
parent 554351 2e15f7800a8f373c56290ff6e01a2e4a72be936a
child 554353 61c35792ca7021377e42150db54b3935b0fd3c40
push id37892
push usernbeleuzu@mozilla.com
push dateSun, 25 Oct 2020 21:41:16 +0000
treeherdermozilla-central@61c35792ca70 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1672777
milestone84.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1672777 - [devtools] Only try to replace the mime-type when it is available r=Honza Differential Revision: https://phabricator.services.mozilla.com/D94593
devtools/client/netmonitor/src/components/request-details/RequestPanel.js
--- a/devtools/client/netmonitor/src/components/request-details/RequestPanel.js
+++ b/devtools/client/netmonitor/src/components/request-details/RequestPanel.js
@@ -197,17 +197,17 @@ class RequestPanel extends Component {
       }
     }
 
     if (postData) {
       items.push({
         component: SourcePreview,
         componentProps: {
           text: postData,
-          mode: mimeType.replace(/;.+/, ""),
+          mode: mimeType?.replace(/;.+/, ""),
           targetSearchResult,
         },
         header: REQUEST_POST_PAYLOAD,
         id: "requestPostPayload",
         opened: true,
       });
     }