Skip to content

Commit 06a5a70

Browse files
committed
fix: 🐛 restore ipc mock and add missing checkOS handler
1 parent 4441cdd commit 06a5a70

File tree

1 file changed

+9
-1
lines changed
  • addons/api/addon/mirage/scenarios

1 file changed

+9
-1
lines changed

addons/api/addon/mirage/scenarios/ipc.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ export default function initializeMockIPC(server, config) {
2222

2323
clusterUrl = null;
2424

25+
checkOS() {
26+
return {
27+
isLinux: false,
28+
isMac: true,
29+
isWindows: false,
30+
};
31+
}
32+
2533
getClusterUrl() {
2634
return this.clusterUrl;
2735
}
@@ -273,7 +281,7 @@ export default function initializeMockIPC(server, config) {
273281
* We mock certain functions even in electron (e.g. hasMacOSChrome) when running
274282
* locally which will force a certain appearance regardless of platform
275283
*/
276-
if (true && !isTesting) {
284+
if (config.mirage?.enabled && !isTesting) {
277285
const mockIPC = new MockIPC();
278286

279287
window.addEventListener('message', async function (event) {

0 commit comments

Comments
 (0)