Skip to content

Commit

Permalink
refactor from computed property to glimmer tracking caching (ember-bo…
Browse files Browse the repository at this point in the history
  • Loading branch information
jelhan authored Dec 19, 2023
1 parent 677304e commit 095c72b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon/components/bs-modal.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { action, computed } from '@ember/object';
import { action } from '@ember/object';
import { assert } from '@ember/debug';
import Component from '@glimmer/component';
import { next, schedule } from '@ember/runloop';
Expand All @@ -9,7 +9,7 @@ import usesTransition from 'ember-bootstrap/utils/decorators/uses-transition';
import isFastBoot from 'ember-bootstrap/utils/is-fastboot';
import deprecateSubclassing from 'ember-bootstrap/utils/deprecate-subclassing';
import arg from '../utils/decorators/arg';
import { tracked } from '@glimmer/tracking';
import { cached, tracked } from '@glimmer/tracking';
import { ref } from 'ember-ref-bucket';

function nextRunloop() {
Expand Down Expand Up @@ -639,7 +639,7 @@ export default class Modal extends Component {
* @readonly
* @private
*/
@computed('modalElement')
@cached
get scrollbarWidth() {
let scrollDiv = document.createElement('div');
scrollDiv.className = 'modal-scrollbar-measure';
Expand Down

0 comments on commit 095c72b

Please sign in to comment.