mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
replaced env.test checks also
This commit is contained in:
parent
16ccca3855
commit
e4d3d29fb8
8 changed files with 23 additions and 29 deletions
|
@ -25,6 +25,7 @@ import { withBatchedUpdates } from "@excalidraw/excalidraw/reactUtils";
|
|||
import {
|
||||
assertNever,
|
||||
isDevEnv,
|
||||
isTestEnv,
|
||||
preventUnload,
|
||||
resolvablePromise,
|
||||
throttleRAF,
|
||||
|
@ -241,7 +242,7 @@ class Collab extends PureComponent<CollabProps, CollabState> {
|
|||
|
||||
appJotaiStore.set(collabAPIAtom, collabAPI);
|
||||
|
||||
if (import.meta.env.MODE === ENV.TEST || isDevEnv()) {
|
||||
if (isTestEnv() || isDevEnv()) {
|
||||
window.collab = window.collab || ({} as Window["collab"]);
|
||||
Object.defineProperties(window, {
|
||||
collab: {
|
||||
|
@ -1014,7 +1015,7 @@ declare global {
|
|||
}
|
||||
}
|
||||
|
||||
if (import.meta.env.MODE === ENV.TEST || isDevEnv()) {
|
||||
if (isTestEnv() || isDevEnv()) {
|
||||
window.collab = window.collab || ({} as Window["collab"]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue