From 42dc3aa06d7a40ba5c851cf448919803241856af Mon Sep 17 00:00:00 2001 From: Jimmy Dee Date: Fri, 27 Mar 2020 14:04:02 -0700 Subject: [PATCH] Cleaner syntax --- fastlane/lib/helper/update_helper.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fastlane/lib/helper/update_helper.rb b/fastlane/lib/helper/update_helper.rb index 4d2da03ae..7c788a3ae 100644 --- a/fastlane/lib/helper/update_helper.rb +++ b/fastlane/lib/helper/update_helper.rb @@ -140,8 +140,7 @@ def update_rnbranch_xcodeproj(version) rnbranch_option = %[RNBRANCH_VERSION=@\\"#{version}\\"] project = Xcodeproj::Project.open 'ios/RNBranch.xcodeproj' project.build_configurations.each do |config| - options = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] - options ||= [] + options = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] || [] options = options.reject { |o| o =~ /^RNBRANCH_VERSION=/ } options << rnbranch_option config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = options