Skip to content

Commit e91aa2e

Browse files
committed
fix(url_for): initialize relative_url function
1 parent 3d0ba3c commit e91aa2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/plugins/helper/url_for.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const url = require('url');
4+
const relative_url = require('./relative_url');
45

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

2324
// Resolve relative url
2425
if (options.relative) {
25-
return this.relative_url(this.path, path);
26+
return relative_url(this.path, path);
2627
}
2728

2829
// Prepend root path

0 commit comments

Comments
 (0)