Open 0x8000ff opened 1 year ago
A popup.params is not defined error popup when swipe down the popup. but there's no issue when the React strict mode is turned off
popup.params
TypeError Cannot read properties of undefined (reading 'swipeToClose') HTMLDivElement.handleTouchStart https://j4ygs3.csb.app/node_modules/framework7/components/popup/popup-class.js:112:62 HTMLDivElement.handleEvent https://j4ygs3.csb.app/node_modules/dom7/dom7.esm.js:880:14
function handleTouchStart(e) { if (isTouched || !allowSwipeToClose || !popup.params.swipeToClose) return; if (popup.params.swipeHandler && $(e.target).closest(popup.params.swipeHandler).length === 0) { return;
Steps to reproduce the behavior:
swipe to close
Cannot read properties of undefined (reading 'swipeToClose')
const STRICT = true;
const STRICT = false;
When react is in strict mode, no errors are displayed.
When the strict mode is enabled, an undefined error appears.
https://i.imgur.com/O7k2cTM.png
Describe the bug
A
popup.params
is not defined error popup when swipe down the popup. but there's no issue when the React strict mode is turned offTo Reproduce
Steps to reproduce the behavior:
swipe to close
button.Cannot read properties of undefined (reading 'swipeToClose')
will appear.const STRICT = true;
in line 11 of the codesandbox demo withconst STRICT = false;
, and repeat the step again, no error will appearExpected behavior
When react is in strict mode, no errors are displayed.
Actual Behavior
When the strict mode is enabled, an undefined error appears.
Screenshots
https://i.imgur.com/O7k2cTM.png