Skip to content

Commit

Permalink
Merge pull request modesty#159 from ranhalprin/do_not_fail_url_undefined
Browse files Browse the repository at this point in the history
Do not fail if url is undefined
  • Loading branch information
modesty authored May 26, 2018
2 parents b50fb26 + 030d85d commit 132d32a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/shared/annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 132d32a

Please sign in to comment.