Skip to content

Commit 9d5f38d

Browse files
authored
Merge pull request #779 from rajakvk/rk-775-fix-linting-error-4
Fix linting error (#775)
2 parents 8149f2a + a2a8cae commit 9d5f38d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

app/components/ember-anchor.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
/* eslint-disable ember/classic-decorator-no-classic-methods */
2-
import { get } from '@ember/object';
32
import AnchorComponent from 'ember-anchor/components/ember-anchor';
43
import config from 'ember-api-docs/config/environment';
54
import getOffset from 'ember-api-docs/utils/get-offset';
65

76
export default class EmberAnchor extends AnchorComponent {
87
// This overrides Ember Anchor to support scrolling within a fixed position element
98
_scrollToElemPosition() {
10-
let qp = this.anchorQueryParam;
11-
let qpVal = this.get(get(this, 'attrs.a') ? 'a' : `controller.${qp}`);
12-
let elem = document.querySelector(`[data-${qp}="${qpVal}"]`);
9+
let elem = document.querySelector(
10+
`[data-${this.anchorQueryParam}="${this.a}"]`
11+
);
1312

1413
if (elem && elem.offsetHeight) {
1514
const offsetToScroll = getOffset(

0 commit comments

Comments
 (0)