FIX: Update user results page when no users found (#18363)
The page was not updated if the server did not return any results. This caused the page to be either empty or display the previous result set.
This commit is contained in:
@@ -59,10 +59,10 @@ export default Controller.extend(CanCheckEmails, {
|
||||
page,
|
||||
})
|
||||
.then((result) => {
|
||||
if (result && result.length > 0) {
|
||||
this._results[page] = result;
|
||||
this.set("model", this._results.flat());
|
||||
} else {
|
||||
this._results[page] = result;
|
||||
this.set("model", this._results.flat());
|
||||
|
||||
if (result.length === 0) {
|
||||
this._canLoadMore = false;
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user