Skip to content

Commit 04a5611

Browse files
committed
fix captionstoggleplugin internal state on startup
1 parent 51bfaee commit 04a5611

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.5.2] - unreleased
9+
10+
### Fixed
11+
12+
- Ensured that CaptionsTogglePlugin internal state is maintained when reading from localStorage on startup
13+
814
## [2.5.1] - 2024-04-16
915

1016
### Fixed

src/plugins/CaptionsTogglePlugin.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,8 @@ export class CaptionsTogglePlugin extends ButtonPlugin {
6565
return;
6666
}
6767

68-
const captionsMuted = !!SavedData.read(CaptionsTogglePlugin.captionsToggleKey);
69-
70-
this._setMuteProp('captionsMuted', this._captionsButtons, captionsMuted, true);
68+
this._captionsMuted = !!SavedData.read(CaptionsTogglePlugin.captionsToggleKey);
69+
this._setMuteProp('captionsMuted', this._captionsButtons, this._captionsMuted, true);
7170

7271
}.bind(this)
7372
);

0 commit comments

Comments
 (0)