Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f1dd2a9

Browse files
feat: update sourcemaps.gradle
1 parent 8716d32 commit f1dd2a9

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

plugin/src/withInstabug.ts

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ export interface PluginProps {
1010

1111
const withInstabugPlugin: ConfigPlugin<PluginProps> = (config, props) => {
1212
let cfg = config;
13+
if (props.enable === null) {
14+
props.enable = false;
15+
}
1316
if (props.enable === true) {
1417
try {
1518
cfg = withInstabugAndroid(cfg, {
@@ -19,14 +22,14 @@ const withInstabugPlugin: ConfigPlugin<PluginProps> = (config, props) => {
1922
} catch (e) {
2023
console.warn(`There was a problem with configuring your native Android project: ${e}`);
2124
}
22-
try {
23-
cfg = withInstabugIOS(cfg, {
24-
...props,
25-
name: instabugPackage.name,
26-
});
27-
} catch (e) {
28-
console.warn(`There was a problem with configuring your native iOS project: ${e}`);
29-
}
25+
}
26+
try {
27+
cfg = withInstabugIOS(cfg, {
28+
...props,
29+
name: instabugPackage.name,
30+
});
31+
} catch (e) {
32+
console.warn(`There was a problem with configuring your native iOS project: ${e}`);
3033
}
3134

3235
return cfg;

plugin/src/withInstabugIOS.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const withInstabugIOS: ConfigPlugin<PluginProps> = (config, props) => {
3434
// Add Instabug build phase if not present
3535
const instabugPhase = findPhaseByName(INSTABUG_BUILD_PHASE);
3636

37-
if (instabugPhase == null) {
37+
if (instabugPhase == null && props.enable) {
3838
const packagePath = require.resolve(`${props.name}/package.json`);
3939
const packageDir = path.dirname(packagePath);
4040
const sourcemapsPath = path.join(packageDir, 'ios/sourcemaps.sh');

0 commit comments

Comments
 (0)