diff --git a/lib/full_url_for.js b/lib/full_url_for.js index 0d4e8828..d22e194a 100755 --- a/lib/full_url_for.js +++ b/lib/full_url_for.js @@ -17,7 +17,7 @@ function fullUrlForHelper(path = '/') { const { trailing_index } = Object.assign({ trailing_index: true - }, config.pretty_url); + }, config.pretty_urls); if (!trailing_index) path = path.replace(/index\.html$/, ''); diff --git a/lib/url_for.js b/lib/url_for.js index 6e7e1329..ffc44e19 100644 --- a/lib/url_for.js +++ b/lib/url_for.js @@ -29,7 +29,7 @@ function urlForHelper(path = '/', options) { const { trailing_index } = Object.assign({ trailing_index: true - }, config.pretty_url); + }, config.pretty_urls); if (!trailing_index) path = path.replace(/index\.html$/, ''); diff --git a/test/full_url_for.spec.js b/test/full_url_for.spec.js index c6949f89..44c92725 100755 --- a/test/full_url_for.spec.js +++ b/test/full_url_for.spec.js @@ -26,9 +26,9 @@ describe('full_url_for', () => { fullUrlFor('/index.html').should.eql('https://example.com/index.html'); }); - it('internal url - pretty_url.trailing_index disabled', () => { + it('internal url - pretty_urls.trailing_index disabled', () => { ctx.config.url = 'https://example.com'; - ctx.config.pretty_url = { + ctx.config.pretty_urls = { trailing_index: false }; diff --git a/test/url_for.spec.js b/test/url_for.spec.js index 1a07b6e9..387eb6a7 100644 --- a/test/url_for.spec.js +++ b/test/url_for.spec.js @@ -64,7 +64,7 @@ describe('url_for', () => { it('internal url (pretty_url.trailing_index disabled)', () => { ctx.config.root = '/'; - ctx.config.pretty_url = { + ctx.config.pretty_urls = { trailing_index: false };