diff --git a/js/hal.js b/js/hal.js index 7981dae..0bbfd5a 100644 --- a/js/hal.js +++ b/js/hal.js @@ -19,6 +19,9 @@ return str.replace(replaceRegex, '.../'); }, buildUrl: function(rel) { + if (!HAL.currentDocument._links) { + return rel; + } if (!rel.match(urlRegex) && isCurie(rel) && HAL.currentDocument._links.curies) { var parts = rel.split(':'); var curies = HAL.currentDocument._links.curies;