Commit ef012df 1 parent a83b77b commit ef012df Copy full SHA for ef012df
File tree 4 files changed +8
-4
lines changed
4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
import { message } from "antd" ;
2
2
import { ServerRequestError } from "../../utils/error/server-request-error" ;
3
- import { NODE_ENV } from "../../constants/process" ;
4
3
import { i18n } from "../../utils/i18n" ;
5
4
6
5
export const errorTips = ( e : unknown ) : void => {
7
- if ( NODE_ENV === "development" ) {
6
+ if ( process . env . NODE_ENV === "development" ) {
8
7
console . error ( e ) ;
9
8
}
10
9
Original file line number Diff line number Diff line change @@ -391,6 +391,9 @@ export class WhiteboardStore {
391
391
if ( ! room || ! windowManager ) {
392
392
return ;
393
393
}
394
+ if ( ! room . isWritable ) {
395
+ return ;
396
+ }
394
397
if ( ! room . state . globalState || ! ( room . state . globalState as any ) . scrollToTop ) {
395
398
room . setGlobalState ( { scrollToTop : true } ) ;
396
399
windowManager . moveCamera ( { centerY : - 950 , animationMode : AnimationMode . Immediately } ) ;
Original file line number Diff line number Diff line change 1
1
import { message } from "antd" ;
2
2
import { ServerRequestError } from "../../utils/error/server-request-error" ;
3
- import { NODE_ENV } from "../../constants/process" ;
4
3
import { i18n } from "../../utils/i18n" ;
5
4
6
5
export const errorTips = ( e : unknown ) : void => {
7
- if ( NODE_ENV === "development" ) {
6
+ if ( process . env . NODE_ENV === "development" ) {
8
7
console . error ( e ) ;
9
8
}
10
9
Original file line number Diff line number Diff line change @@ -359,6 +359,9 @@ export class WhiteboardStore {
359
359
if ( ! room || ! windowManager ) {
360
360
return ;
361
361
}
362
+ if ( ! room . isWritable ) {
363
+ return ;
364
+ }
362
365
if ( ! room . state . globalState || ! ( room . state . globalState as any ) . scrollToTop ) {
363
366
room . setGlobalState ( { scrollToTop : true } ) ;
364
367
windowManager . moveCamera ( { centerY : - 950 , animationMode : AnimationMode . Immediately } ) ;
You can’t perform that action at this time.
0 commit comments