Fix hook update
Showing 2 of 13 files from the diff.
src/reconciler/proxies.js
changed.
src/proxy/createClassProxy.js
changed.
Other files ignored by Codecov
examples/redux/src/index.js
is new.
examples/redux/index_csp.html
is new.
examples/redux/package.json
is new.
examples/redux/yarn-error.log
is new.
examples/redux/.gitignore
is new.
examples/redux/src/App.js
is new.
examples/redux/yarn.lock
is new.
examples/redux/.babelrc
is new.
@@ -57,8 +57,7 @@
Loading
57 | 57 | id, |
|
58 | 58 | merge({}, renderOptions, { proxy: componentOptions.get(type) || {} }, options), |
|
59 | 59 | ); |
|
60 | - | } else { |
|
61 | - | proxiesByID[id].update(type); |
|
60 | + | } else if (proxiesByID[id].update(type)) { |
|
62 | 61 | // proxy could be registered again only in case of HMR |
|
63 | 62 | incrementHotGeneration(); |
|
64 | 63 | } |
@@ -341,13 +341,13 @@
Loading
341 | 341 | } |
|
342 | 342 | ||
343 | 343 | if (NextComponent === CurrentComponent) { |
|
344 | - | return; |
|
344 | + | return false; |
|
345 | 345 | } |
|
346 | 346 | ||
347 | 347 | // Prevent proxy cycles |
|
348 | 348 | const existingProxy = proxies.get(NextComponent); |
|
349 | 349 | if (existingProxy) { |
|
350 | - | return; |
|
350 | + | return false; |
|
351 | 351 | } |
|
352 | 352 | ||
353 | 353 | isFunctionalComponent = !isReactClass(NextComponent); |
@@ -412,6 +412,8 @@
Loading
412 | 412 | classUpdatePostponed = classHotReplacement; |
|
413 | 413 | } |
|
414 | 414 | } |
|
415 | + | ||
416 | + | return true; |
|
415 | 417 | } |
|
416 | 418 | ||
417 | 419 | update(InitialComponent); |
Files | Coverage |
---|---|
src | 79.64% |
testConfig | 85.00% |
index.js | 20.83% |
test/proxy/helper.js | 100.00% |
Project Totals (39 files) | 79.03% |
1593.1
1593.2
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.