Skip to content

Commit

Permalink
Null check HashMap's get result in ReactNativeBlobUtilReq instead of …
Browse files Browse the repository at this point in the history
…checking for key first, to prevent potential async issues
  • Loading branch information
Jonathon Brammer committed Jan 28, 2023
1 parent 2e14e6b commit 172e4a8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ else if (arrayBody != null)
}

public static void cancelTask(String taskId) {
if (taskTable.containsKey(taskId)) {
Call call = taskTable.get(taskId);
Call call = taskTable.get(taskId);
if (call != null) {
call.cancel();
taskTable.remove(taskId);
}
Expand Down

0 comments on commit 172e4a8

Please sign in to comment.