mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-25 09:35:33 +00:00
Refactor the way we check for if widget or not to make it easier to mock
This commit is contained in:
@@ -181,3 +181,10 @@ export const widget = ((): WidgetHelpers | null => {
|
||||
return null;
|
||||
}
|
||||
})();
|
||||
|
||||
/**
|
||||
* Whether or not we are running as a widget.
|
||||
*
|
||||
* @returns true if widget, false if SPA
|
||||
*/
|
||||
export const isRunningAsWidget: boolean = !!widget;
|
||||
|
||||
Reference in New Issue
Block a user