Skip to content

Commit

Permalink
fix: react-native compatibility for v0.64+
Browse files Browse the repository at this point in the history
* Update EventEmitter.js

* Update EventEmitter.js
  • Loading branch information
kantorcodes authored Mar 19, 2022
1 parent c7f2484 commit b906444
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/EventEmitter.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
*/

if (process.env.PARSE_BUILD === 'react-native') {
const EventEmitter = require('../../../react-native/Libraries/vendor/emitter/EventEmitter');
let EventEmitter = require('../../../react-native/Libraries/vendor/emitter/EventEmitter');
if (EventEmitter.default) {
EventEmitter = EventEmitter.default;
}
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
module.exports = EventEmitter;
} else {
Expand Down

0 comments on commit b906444

Please sign in to comment.