We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae946b7 commit 265a2e8Copy full SHA for 265a2e8
app/components/ember-anchor.js
@@ -1,3 +1,4 @@
1
+/* eslint-disable ember/classic-decorator-no-classic-methods */
2
import AnchorComponent from 'ember-anchor/components/ember-anchor';
3
import config from 'ember-api-docs/config/environment';
4
import getOffset from 'ember-api-docs/utils/get-offset';
@@ -6,7 +7,7 @@ export default class EmberAnchor extends AnchorComponent {
6
7
// This overrides Ember Anchor to support scrolling within a fixed position element
8
_scrollToElemPosition() {
9
let qp = this.anchorQueryParam;
- let qpVal = this[this['attrs.a'] ? 'a' : `controller.${qp}`];
10
+ let qpVal = this.a ?? this.controller[qp];
11
let elem = document.querySelector(`[data-${qp}="${qpVal}"]`);
12
13
if (elem && elem.offsetHeight) {
0 commit comments