draft-js fails flow 0.38.0
See original GitHub issuenew flow gives following errors:
node_modules/draft-js/lib/expandRangeToStartOfLine.js.flow:34
34: document.body.appendChild(div);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method appendChild
. Method cannot be called on possibly null value
34: document.body.appendChild(div);
^^^^^^^^^^^^^ null
node_modules/draft-js/lib/expandRangeToStartOfLine.js.flow:36
36: document.body.removeChild(div);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call of method removeChild
. Method cannot be called on possibly null value
36: document.body.removeChild(div);
^^^^^^^^^^^^^ null
node_modules/draft-js/lib/getSafeBodyFromHTML.js.flow:29
29: doc.documentElement.innerHTML = html;
^^^^^^^^^ property innerHTML
. Property cannot be assigned on possibly null value
29: doc.documentElement.innerHTML = html;
^^^^^^^^^^^^^^^^^^^ null
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:5 (3 by maintainers)
Top GitHub Comments
document.body
anddocument.documentElement
are nullable after https://github.com/facebook/flow/pull/3127I agree with you. These are annoying warnings.