({code, message}: $FlowFixMe)
| 176 | } |
| 177 | |
| 178 | function onError({code, message}: $FlowFixMe) { |
| 179 | safeUnmount(); |
| 180 | |
| 181 | if (code === 'EADDRINUSE') { |
| 182 | node.innerHTML = ` |
| 183 | <div class="box"> |
| 184 | <div class="box-header"> |
| 185 | Another instance of DevTools is running. |
| 186 | </div> |
| 187 | <div class="box-content"> |
| 188 | Only one copy of DevTools can be used at a time. |
| 189 | </div> |
| 190 | </div> |
| 191 | `; |
| 192 | } else { |
| 193 | node.innerHTML = ` |
| 194 | <div class="box"> |
| 195 | <div class="box-header"> |
| 196 | Unknown error |
| 197 | </div> |
| 198 | <div class="box-content"> |
| 199 | ${message} |
| 200 | </div> |
| 201 | </div> |
| 202 | `; |
| 203 | } |
| 204 | } |
| 205 | |
| 206 | function openProfiler() { |
| 207 | // Mocked up bridge and store to allow the DevTools to be rendered |
no test coverage detected