Skip to content

Commit 8e32556

Browse files
committed
dynamically fill white spaces
1 parent c356288 commit 8e32556

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/core/plugin/src/withSentryIOS.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ export function modifyAppDelegate(config: ExpoConfig): ExpoConfig {
103103
// Add RNSentrySDK.start() at the beginning of application method
104104
const originalContents = config.modResults.contents;
105105
config.modResults.contents = config.modResults.contents.replace(
106-
/(func application\([^)]*\) -> Bool \{)/s,
107-
`$1\n RNSentrySDK.start()`,
106+
/(func application\([^)]*\) -> Bool \{)\s*\n(\s*)/s,
107+
`$1\n$2RNSentrySDK.start()\n$2`,
108108
);
109109
if (config.modResults.contents === originalContents) {
110110
warnOnce(`Failed to insert 'RNSentrySDK.start()' in '${fileName}'.`);

0 commit comments

Comments
 (0)