mirror of
https://github.com/zoriya/react-native-web.git
synced 2026-05-23 06:48:35 +00:00
[fix] Prevent injectEventPluginsByName throwing when re-evaluating code
Close #1539
This commit is contained in:
committed by
Nicolas Gallagher
parent
18427aae50
commit
92737d33f4
@@ -16,9 +16,15 @@ import React from 'react';
|
||||
import ResponderEventPlugin from '../../modules/ResponderEventPlugin';
|
||||
|
||||
if (canUseDOM) {
|
||||
injectEventPluginsByName({
|
||||
ResponderEventPlugin
|
||||
});
|
||||
try {
|
||||
injectEventPluginsByName({
|
||||
ResponderEventPlugin
|
||||
});
|
||||
} catch (error) {
|
||||
// Ignore errors caused by attempting to re-inject the plugin when app
|
||||
// scripts are being re-evaluated (e.g., development hot reloading) while
|
||||
// the ReactDOM instance is preserved.
|
||||
}
|
||||
}
|
||||
|
||||
const isModifiedEvent = event =>
|
||||
|
||||
Reference in New Issue
Block a user