Skip to content

Commit baffeea

Browse files
committed
fix: Remove async marker from checkSessionLockFree
1 parent 5e5a250 commit baffeea

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/BasePlatform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,9 +512,9 @@ export default abstract class BasePlatform {
512512
/**
513513
* Checks if the current session is lock-free, i.e., no other instance is holding the session lock.
514514
* Platforms that support session locking should override this method.
515-
* @returns {Promise<boolean>} True if the session is lock-free, false otherwise.
515+
* @returns {boolean} True if the session is lock-free, false otherwise.
516516
*/
517-
public abstract checkSessionLockFree(): Promise<boolean>;
517+
public abstract checkSessionLockFree(): boolean;
518518
/**
519519
* Attempts to acquire a session lock for this instance.
520520
* If another instance is detected, calls the provided callback.

src/vector/platform/ElectronPlatform.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ export default class ElectronPlatform extends BasePlatform {
559559
return url;
560560
}
561561

562-
public async checkSessionLockFree(): Promise<boolean> {
562+
public checkSessionLockFree(): boolean {
563563
return true;
564564
}
565565

src/vector/platform/WebPlatform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export default class WebPlatform extends BasePlatform {
270270
window.location.reload();
271271
}
272272

273-
public async checkSessionLockFree(): Promise<boolean> {
273+
public checkSessionLockFree(): boolean {
274274
return SessionLock.checkSessionLockFree();
275275
}
276276

test/test-utils/platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class MockPlatform extends BasePlatform {
2020
Object.assign(this, platformMocks);
2121
}
2222

23-
public async checkSessionLockFree(): Promise<boolean> {
23+
public checkSessionLockFree(): boolean {
2424
return SessionLock.checkSessionLockFree();
2525
}
2626

0 commit comments

Comments
 (0)