Skip to content

Commit 654e247

Browse files
authored
Merge pull request #18 from photogabble/release/v1.0.6
Release 1.0.6
2 parents 1573806 + 0481419 commit 654e247

File tree

4 files changed

+263
-202
lines changed

4 files changed

+263
-202
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.0.6]
11+
12+
- Bugfix ensuring aliases value is array when treated as one (#17)
13+
- Updated npm dependencies
14+
1015
## [1.0.5]
1116

1217
- Change to use `url` instead of `inputPath` for unique page key, this is because some pages can share the same `inputPath` such as those generated via pagination.
@@ -40,3 +45,4 @@ First release
4045
[1.0.3]: https://github.com/photogabble/eleventy-plugin-font-subsetting/releases/tag/v1.0.3
4146
[1.0.4]: https://github.com/photogabble/eleventy-plugin-font-subsetting/releases/tag/v1.0.4
4247
[1.0.5]: https://github.com/photogabble/eleventy-plugin-font-subsetting/releases/tag/v1.0.5
48+
[1.0.5]: https://github.com/photogabble/eleventy-plugin-font-subsetting/releases/tag/v1.0.6

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ module.exports = function (eleventyConfig, options = {}) {
144144
const found = (page.fileSlug === link.slug || (page.data.title && opts.slugifyFn(page.data.title) === link.slug));
145145
if (found) return true;
146146

147-
const aliases = (page.data.aliases ?? []).reduce(function(set, alias){
147+
const aliases = ((page.data.aliases && Array.isArray(page.data.aliases)) ? page.data.aliases : []).reduce(function(set, alias){
148148
set.add(opts.slugifyFn(alias));
149149
return set;
150150
}, new Set());

0 commit comments

Comments
 (0)