Skip to content

Commit 10a90ae

Browse files
authored
fix: web compilation (#541)
## 📜 Description Fixed web compilation. ## 💡 Motivation and Context Since I added new `event-handler` file - on web it'll try to import that, but it'll lead to errors, because this file depends on native module which is available on Android and iOS. To fix that I'm exporting a mock function to make sure this library is still compilable on web. ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### JS - added `event-handler.web.js` file. ## 🤔 How Has This Been Tested? Tested manually on web project - the compilation error has gone. ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent cfc62b7 commit 10a90ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/event-handler.web.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const NOOP = () => {};
2+
const registerEventHandler = NOOP;
3+
const unregisterEventHandler = NOOP;
4+
5+
export { registerEventHandler, unregisterEventHandler };

0 commit comments

Comments
 (0)