You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-08 21:42:24 +03:00
Fix: make sure scalarUrls is never undefined
This commit is contained in:
@@ -100,11 +100,14 @@ export default class WidgetUtils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const testUrl = url.parse(testUrlString);
|
const testUrl = url.parse(testUrlString);
|
||||||
|
|
||||||
let scalarUrls = SdkConfig.get().integrations_widgets_urls;
|
let scalarUrls = SdkConfig.get().integrations_widgets_urls;
|
||||||
if (!scalarUrls || scalarUrls.length === 0) {
|
if (!scalarUrls || scalarUrls.length === 0) {
|
||||||
const defaultManager = IntegrationManagers.sharedInstance().getPrimaryManager();
|
const defaultManager = IntegrationManagers.sharedInstance().getPrimaryManager();
|
||||||
if (defaultManager) scalarUrls = [defaultManager.apiUrl];
|
if (defaultManager) {
|
||||||
|
scalarUrls = [defaultManager.apiUrl];
|
||||||
|
} else {
|
||||||
|
scalarUrls = [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 0; i < scalarUrls.length; i++) {
|
for (let i = 0; i < scalarUrls.length; i++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user