Skip to content

Commit

Permalink
fix: merge rel attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
daliborgogic committed Nov 6, 2021
1 parent cef2742 commit 48f718c
Show file tree
Hide file tree
Showing 5 changed files with 5,420 additions and 1,788 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
.DS_Store
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Change Log
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.2.5](https://github.com/daliborgogic/nuxt-interpolation/compare/v0.2.2...v0.2.5) (2021-11-06)


### Bug Fixes

* [#12](https://github.com/daliborgogic/nuxt-interpolation/issues/12) ([6913085](https://github.com/daliborgogic/nuxt-interpolation/commit/691308561d22db2eea5aedc06f6aa51522c61de5))

<a name="0.2.2"></a>
## [0.2.2](https://github.com/daliborgogic/nuxt-interpolation/compare/v0.2.1...v0.2.2) (2018-09-13)

Expand Down
4 changes: 3 additions & 1 deletion lib/templates/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ export default ({ app: { router } }) => {
// For improved security `rel="noopener"` will be added automatically if target is `_blank`
// https://github.com/mathiasbynens/rel-noopener/
if (target && target === '_blank') {
links[i].setAttribute('rel', 'noopener')
const rel = links[i].getAttribute('rel')
const attributes = rel ? (rel + ' noopener') : 'noopener'
links[i].setAttribute('rel', attributes)
}
links[i].addEventListener('click', navigate, false)
}
Expand Down
Loading

0 comments on commit 48f718c

Please sign in to comment.