Ensure that Olm is only loaded once
React 18's strict mode intentionally mounts all components twice, which was causing Olm to get double-loaded. Also, it doesn't need to be loaded if the app is running as a widget.
This commit is contained in:
@@ -106,7 +106,8 @@
|
||||
],
|
||||
"moduleNameMapper": {
|
||||
"\\.(css|less|svg)+$": "identity-obj-proxy",
|
||||
"./IndexedDBWorker\\?worker": "<rootDir>/test/mocks/workerMock.ts"
|
||||
"^\\./IndexedDBWorker\\?worker$": "<rootDir>/test/mocks/workerMock.ts",
|
||||
"^\\./olm$": "<rootDir>/test/mocks/olmMock.ts"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user