Skip to content

Commit

Permalink
Merge pull request #48 from swup/fix/announcement-translation-type
Browse files Browse the repository at this point in the history
fix: announcement translation type
  • Loading branch information
hirasso authored Apr 2, 2024
2 parents 68b2f3c + 144600e commit 1f1ceb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ export default class SwupA11yPlugin extends Plugin {
// Merge deprecated announcement templates into new structure
options.announcements = {
...this.defaults.announcements,
visit: options.announcementTemplate ?? this.defaults.announcements.visit,
url: options.urlTemplate ?? this.defaults.announcements.url,
visit: options.announcementTemplate ?? String(this.defaults.announcements.visit),
url: options.urlTemplate ?? String(this.defaults.announcements.url),
...options.announcements
};

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
"moduleResolution": "Node16", /* Specify how TypeScript looks up a file from a given module specifier. */
"module": "Node16", /* Specify how TypeScript looks up a file from a given module specifier. */
"rootDirs": ["./src"], /* Allow multiple folders to be treated as one when resolving modules. */
"resolveJsonModule": true, /* Enable importing .json files. */
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
Expand Down

0 comments on commit 1f1ceb8

Please sign in to comment.