File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change
1
+ /* eslint-disable ember/classic-decorator-no-classic-methods */
2
+ import { get } from '@ember/object' ;
1
3
import AnchorComponent from 'ember-anchor/components/ember-anchor' ;
2
4
import config from 'ember-api-docs/config/environment' ;
3
5
import getOffset from 'ember-api-docs/utils/get-offset' ;
@@ -6,7 +8,7 @@ export default class EmberAnchor extends AnchorComponent {
6
8
// This overrides Ember Anchor to support scrolling within a fixed position element
7
9
_scrollToElemPosition ( ) {
8
10
let qp = this . anchorQueryParam ;
9
- let qpVal = this [ this [ 'attrs.a' ] ? 'a' : `controller. ${ qp } ` ] ;
11
+ let qpVal = this . a ?? this . controller [ qp ] ;
10
12
let elem = document . querySelector ( `[data-${ qp } ="${ qpVal } "]` ) ;
11
13
12
14
if ( elem && elem . offsetHeight ) {
You can’t perform that action at this time.
0 commit comments