MOBILE-3068 core: Fix cannot read indexOf null in external-content
parent
1b944f0bdc
commit
0e1bb20c9e
|
@ -150,7 +150,7 @@ export class CoreExternalContentDirective implements AfterViewInit, OnChanges {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avoid handling data url's.
|
// Avoid handling data url's.
|
||||||
if (url.indexOf('data:') === 0) {
|
if (url && url.indexOf('data:') === 0) {
|
||||||
this.invalid = true;
|
this.invalid = true;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -468,7 +468,7 @@ export class CoreFormatTextDirective implements OnChanges {
|
||||||
// Wait for images to load.
|
// Wait for images to load.
|
||||||
let promise: Promise<any> = null;
|
let promise: Promise<any> = null;
|
||||||
if (externalImages.length) {
|
if (externalImages.length) {
|
||||||
promise = Promise.all(externalImages.map((externalImage) => {
|
promise = Promise.all(externalImages.map((externalImage): any => {
|
||||||
if (externalImage.loaded) {
|
if (externalImage.loaded) {
|
||||||
// Image has already been loaded, no need to wait.
|
// Image has already been loaded, no need to wait.
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
|
|
Loading…
Reference in New Issue