mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +02:00
Use some
for needsRebuild in SubtreeRetainer
This commit is contained in:
committed by
Franz Liedke
parent
c8d5ca51bb
commit
07f04c7ba7
@@ -33,18 +33,16 @@ export default class SubtreeRetainer {
|
||||
* @public
|
||||
*/
|
||||
needsRebuild() {
|
||||
let needsRebuild = false;
|
||||
|
||||
this.callbacks.forEach((callback, i) => {
|
||||
return this.callbacks.some((callback, i) => {
|
||||
const result = callback();
|
||||
|
||||
if (result !== this.data[i]) {
|
||||
this.data[i] = result;
|
||||
needsRebuild = true;
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
return needsRebuild;
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user