mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix global.__fetchSegment's error case (#46854)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/46854 When segment fetch fails, it seems incorrect to call the callback twice: once with error, and once with null. This seems like a bug. Created from CodeHub with https://fburl.com/edit-in-codehub Changelog: [Internal] Reviewed By: yungsters Differential Revision: D63959015 fbshipit-source-id: f3ebb0f4732d99d91b5717a5bf193f44d957bde4
This commit is contained in:
committed by
Facebook GitHub Bot
parent
352c063589
commit
d0912ed067
@@ -42,6 +42,7 @@ function __fetchSegment(
|
||||
const error = new Error(errorObject.message);
|
||||
(error: any).code = errorObject.code; // flowlint-line unclear-type: off
|
||||
callback(error);
|
||||
return;
|
||||
}
|
||||
|
||||
callback(null);
|
||||
|
||||
Reference in New Issue
Block a user