Skip to content

Commit

Permalink
🛠 Refactor: Cleanup RNIModalViewModule
Browse files Browse the repository at this point in the history
  • Loading branch information
dominicstop committed Mar 27, 2023
1 parent 325c9ad commit 4a00df7
Showing 1 changed file with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ class RNIModalViewModule: RCTEventEmitter {
){
DispatchQueue.main.async {
guard let modalView = self.getModalViewInstance(for: node) else {
reject(nil, "Unable to get the corresponding 'RNIModalView' instance for node: \(node)", nil);
let message =
"RNIModalViewModule.setModalVisibility - Unable to get the "
+ "corresponding 'RNIModalView' instance for node: \(node)"

reject(nil, message, nil);
return;
};

Expand All @@ -167,7 +171,11 @@ class RNIModalViewModule: RCTEventEmitter {
){
DispatchQueue.main.async {
guard let modalView = self.getModalViewInstance(for: node) else {
reject(nil, "Unable to get the corresponding 'RNIModalView' instance for node: \(node)", nil);
let message =
"RNIModalViewModule.requestModalInfo - Unable to get the "
+ "corresponding 'RNIModalView' instance for node: \(node)"

reject(nil, message, nil);
return;
};

Expand Down

0 comments on commit 4a00df7

Please sign in to comment.