export empty object if Instabug native module is not defined

This commit is contained in:
Roman Volosovskyi 2017-05-18 13:29:26 +03:00 committed by Dmitry Novotochinov
parent cbf6c2d5d8
commit 92f919a683
No known key found for this signature in database
GPG Key ID: 267674DCC86628D9

View File

@ -1,6 +1,7 @@
import {NativeModules, NativeAppEventEmitter, DeviceEventEmitter, Platform} from "react-native";
let {Instabug} = NativeModules;
if(Instabug) {
/**
* Instabug
* @exports Instabug
@ -1098,3 +1099,6 @@ module.exports = {
collectingDataText: Instabug.collectingDataText
}
};
} else {
module.exports = {};
}