From c3e930fb832fc312b3729e7fc076d4c1b90b3e25 Mon Sep 17 00:00:00 2001 From: pcholuj Date: Tue, 12 Feb 2019 09:21:21 +0100 Subject: [PATCH] fix(filelink): Add check hasOwnProperty to loop --- src/lib/filelink.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/filelink.ts b/src/lib/filelink.ts index d39bf4c5..519f6449 100644 --- a/src/lib/filelink.ts +++ b/src/lib/filelink.ts @@ -1182,6 +1182,10 @@ export class Filelink { let toTest = Array.isArray(this.source) ? this.source : [this.source]; for (let i in toTest) { + if (!toTest.hasOwnProperty(i)) { + continue; + } + if (toTest[i].indexOf('src:') === 0 || toTest[i].indexOf('http') === 0) { return true; }