1 | var deepForceUpdate = require('./deepForceUpdate');
|
2 |
|
3 | var isRequestPending = false;
|
4 |
|
5 | module.exports = function requestForceUpdateAll(getRootInstances) {
|
6 | if (isRequestPending) {
|
7 | return;
|
8 | }
|
9 |
|
10 | |
11 |
|
12 |
|
13 |
|
14 |
|
15 | function forceUpdateAll() {
|
16 | isRequestPending = false;
|
17 |
|
18 | var rootInstances = getRootInstances(),
|
19 | rootInstance;
|
20 |
|
21 | for (var key in rootInstances) {
|
22 | if (rootInstances.hasOwnProperty(key)) {
|
23 | deepForceUpdate(rootInstances[key]);
|
24 | }
|
25 | }
|
26 | }
|
27 |
|
28 | setTimeout(forceUpdateAll);
|
29 | }; |
\ | No newline at end of file |