diff --git a/ios/RCTMarkdownUtils.mm b/ios/RCTMarkdownUtils.mm index 2338a222..913b718b 100644 --- a/ios/RCTMarkdownUtils.mm +++ b/ios/RCTMarkdownUtils.mm @@ -28,6 +28,9 @@ - (NSAttributedString *)parseMarkdown:(nullable NSAttributedString *)input withA } static std::shared_ptr runtime; + static std::mutex runtimeMutex; + auto lock = std::lock_guard(runtimeMutex); + if (runtime == nullptr) { NSString *path = [[NSBundle mainBundle] pathForResource:@"react-native-live-markdown-parser" ofType:@"js"]; assert(path != nil && "[react-native-live-markdown] Markdown parser bundle not found"); diff --git a/package.json b/package.json index 848e5628..37b46bf4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@expensify/react-native-live-markdown", - "version": "0.1.99", + "version": "0.1.100", "description": "Drop-in replacement for React Native's TextInput component with Markdown formatting.", "main": "lib/commonjs/index", "module": "lib/module/index",