mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-09-14 13:04:59 +00:00
Fix type parameters coming from parsed URLs
This commit is contained in:
parent
cee2e72a46
commit
9a62b34fb7
@ -25,7 +25,7 @@ export class JitsiWidgetConfigComponent extends WidgetComponent {
|
|||||||
const conferenceId = parsedUrl.query["conferenceId"];
|
const conferenceId = parsedUrl.query["conferenceId"];
|
||||||
const confId = parsedUrl.query["confId"];
|
const confId = parsedUrl.query["confId"];
|
||||||
const domain = parsedUrl.query["domain"];
|
const domain = parsedUrl.query["domain"];
|
||||||
let isAudioConf = parsedUrl.query["isAudioConf"];
|
let isAudioConf: string | boolean = <string>parsedUrl.query["isAudioConf"];
|
||||||
|
|
||||||
// Convert isAudioConf to boolean
|
// Convert isAudioConf to boolean
|
||||||
if (isAudioConf === "true") isAudioConf = true;
|
if (isAudioConf === "true") isAudioConf = true;
|
||||||
|
@ -29,7 +29,7 @@ export class YoutubeWidgetConfigComponent extends WidgetComponent {
|
|||||||
// Older Dimension widget - infer link
|
// Older Dimension widget - infer link
|
||||||
const parsedUrl = url.parse(widget.url, true);
|
const parsedUrl = url.parse(widget.url, true);
|
||||||
if (parsedUrl.query["url"]) {
|
if (parsedUrl.query["url"]) {
|
||||||
widget.data.videoUrl = this.parseVideoUrl(decodeURIComponent(parsedUrl.query["url"]));
|
widget.data.videoUrl = this.parseVideoUrl(decodeURIComponent(<string>parsedUrl.query["url"]));
|
||||||
} else console.warn("Cannot parse URL for " + widget.id);
|
} else console.warn("Cannot parse URL for " + widget.id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user