From 030d85d59a256590290b89306730c53b3f46e120 Mon Sep 17 00:00:00 2001 From: Ran Halprin Date: Mon, 21 May 2018 11:31:16 -0700 Subject: [PATCH] Do not fail if url is undefined --- base/shared/annotation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/shared/annotation.js b/base/shared/annotation.js index f7a23a6d..01830797 100755 --- a/base/shared/annotation.js +++ b/base/shared/annotation.js @@ -667,7 +667,7 @@ var LinkAnnotation = (function LinkAnnotationClosure() { // Lets URLs beginning with 'www.' default to using the 'http://' protocol. function addDefaultProtocolToUrl(url) { - if (url.indexOf('www.') === 0) { + if (url && url.indexOf('www.') === 0) { return ('http://' + url); } return url;