fix: race condition where race condition where loadMovies/loadSeries was called before
hiddenCategoryIds was populated
This commit is contained in:
@@ -27,9 +27,9 @@ class MoviesPage {
|
||||
|
||||
init() {
|
||||
// Source change handler
|
||||
this.sourceSelect?.addEventListener('change', () => {
|
||||
this.loadCategories();
|
||||
this.loadMovies();
|
||||
this.sourceSelect?.addEventListener('change', async () => {
|
||||
await this.loadCategories();
|
||||
await this.loadMovies();
|
||||
});
|
||||
|
||||
// Category change handler
|
||||
|
||||
@@ -31,9 +31,9 @@ class SeriesPage {
|
||||
|
||||
init() {
|
||||
// Source change handler
|
||||
this.sourceSelect?.addEventListener('change', () => {
|
||||
this.loadCategories();
|
||||
this.loadSeries();
|
||||
this.sourceSelect?.addEventListener('change', async () => {
|
||||
await this.loadCategories();
|
||||
await this.loadSeries();
|
||||
});
|
||||
|
||||
// Category change handler
|
||||
|
||||
Reference in New Issue
Block a user