Skip to content

Commit

Permalink
fix(url_for): initialize relative_url function
Browse files Browse the repository at this point in the history
  • Loading branch information
curbengh committed Sep 15, 2019
1 parent 3d0ba3c commit e91aa2e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugins/helper/url_for.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const url = require('url');
const relative_url = require('./relative_url');

function urlForHelper(path = '/', options) {
if (path[0] === '#' || path.startsWith('//')) {
Expand All @@ -22,7 +23,7 @@ function urlForHelper(path = '/', options) {

// Resolve relative url
if (options.relative) {
return this.relative_url(this.path, path);
return relative_url(this.path, path);
}

// Prepend root path
Expand Down

0 comments on commit e91aa2e

Please sign in to comment.