Skip to content

Commit

Permalink
Merge pull request #1 from ultish/fix-revert-promise
Browse files Browse the repository at this point in the history
fix for reverting a change back to original promise
  • Loading branch information
ultish authored Mar 17, 2022
2 parents 7f8dc10 + 130c022 commit 9b90921
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions addon/components/power-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,11 @@ export default class PowerSelect extends Component<PowerSelectArgs> {
}
});
} else {
if (this._lastSelectedPromise) {
// no longer using a promise
removeObserver(this._lastSelectedPromise, 'content', this, this._selectedObserverCallback);
this._lastSelectedPromise = undefined;
}
this._resolvedSelected = undefined;
// Don't highlight args.selected array on multi-select
if (!Array.isArray(this.args.selected)) {
Expand Down

0 comments on commit 9b90921

Please sign in to comment.