Skip to content

Commit 3a3e785

Browse files
authored
⬆️ v3.8.3...v3.9.0 (#97)
1 parent 5a7e0b1 commit 3a3e785

File tree

5 files changed

+97
-93
lines changed

5 files changed

+97
-93
lines changed

addon/components/set-links-target.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import $ from 'jquery';
21
import startsWith from 'lodash.startswith';
32

43
import Component from '@ember/component';
5-
import { isEmpty, isPresent } from '@ember/utils';
4+
import { isEmpty } from '@ember/utils';
65

76
import layout from '../templates/components/set-links-target';
87

@@ -28,15 +27,13 @@ export default Component.extend({
2827
const origin = window.document.location.origin;
2928
const targetValue = this.targetValue;
3029
// for each anchor check if we should set the target
31-
this.$('a').each((index, element) => {
32-
const link = $(element);
33-
// are we excluding links to self?
34-
if (isPresent(link.attr('href')) && startsWith(link.attr('href'), origin) && excludeSelfLinks) {
30+
this.element.querySelectorAll('a').forEach(element => {
31+
if (element.hasAttribute('href') && startsWith(element.getAttribute('href'), origin) && excludeSelfLinks) {
3532
return;
3633
}
3734
// got this far, then apply a target if it hasn't already got one
38-
if (isEmpty(link.attr('target'))) {
39-
link.attr('target', targetValue);
35+
if (isEmpty(element.getAttribute('target'))) {
36+
element.setAttribute('target', targetValue);
4037
}
4138
});
4239
},

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"bootstrap-sass": "^3.4.3",
6060
"bootswatch": "^3.4.1",
6161
"broccoli-asset-rev": "^3.0.0",
62-
"ember-cli": "~3.8.3",
62+
"ember-cli": "~3.9.0",
6363
"ember-cli-dependency-checker": "^3.1.0",
6464
"ember-cli-deploy": "^1.0.2",
6565
"ember-cli-deploy-build": "^2.0.0",
@@ -79,7 +79,7 @@
7979
"ember-maybe-import-regenerator": "^0.1.6",
8080
"ember-qunit": "^4.6.0",
8181
"ember-resolver": "^8.0.3",
82-
"ember-source": "~3.8.0",
82+
"ember-source": "~3.9.0",
8383
"ember-source-channel-url": "^3.0.0",
8484
"ember-try": "^2.0.0",
8585
"eslint-plugin-ember": "^7.0.0",

tests/dummy/config/ember-cli-update.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"packages": [
44
{
55
"name": "ember-cli",
6-
"version": "3.8.3",
6+
"version": "3.9.0",
77
"blueprints": [
88
{
99
"name": "addon",

tests/dummy/config/environment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = function (environment) {
99
EmberENV: {
1010
FEATURES: {
1111
// Here you can enable experimental features on an ember canary build
12-
// e.g. 'with-controller': true
12+
// e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true
1313
},
1414
EXTEND_PROTOTYPES: {
1515
// Prevent Ember Data from overriding Date.parse.

0 commit comments

Comments
 (0)