Skip to content

Commit

Permalink
Merge pull request #1173 from openlayers/fix_unlistener
Browse files Browse the repository at this point in the history
Fix wrong unlistener condition
  • Loading branch information
gberaudo authored Feb 28, 2024
2 parents eabac95 + 7fc0a1f commit bceceee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

* Changes
* Support dashed lines by converting the pattern

* Fix unlistening condition in camera._setView

## v 2.19.2

Expand Down
6 changes: 2 additions & 4 deletions src/olcs/Camera.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ export default class Camera {
* @private
*/
setView_(view: View | undefined) {
if (this.view_) {
olObservableUnByKey(this.viewListenKey_);
this.viewListenKey_ = null;
}
olObservableUnByKey(this.viewListenKey_);
this.viewListenKey_ = null;

this.view_ = view;
if (view) {
Expand Down

0 comments on commit bceceee

Please sign in to comment.