[android][storage] fix readable map already consumed error
This commit is contained in:
parent
bdf588e0e2
commit
90546aa7dd
|
@ -357,7 +357,11 @@ public class RNFirebaseStorage extends ReactContextBaseJavaModule {
|
||||||
Log.d(TAG, "putFile success " + taskSnapshot);
|
Log.d(TAG, "putFile success " + taskSnapshot);
|
||||||
WritableMap resp = getUploadTaskAsMap(taskSnapshot);
|
WritableMap resp = getUploadTaskAsMap(taskSnapshot);
|
||||||
sendJSEvent(STORAGE_STATE_CHANGED, path, resp);
|
sendJSEvent(STORAGE_STATE_CHANGED, path, resp);
|
||||||
|
|
||||||
|
// to avoid readable map already consumed errors
|
||||||
|
resp = getUploadTaskAsMap(taskSnapshot);
|
||||||
sendJSEvent(STORAGE_UPLOAD_SUCCESS, path, resp);
|
sendJSEvent(STORAGE_UPLOAD_SUCCESS, path, resp);
|
||||||
|
|
||||||
resp = getUploadTaskAsMap(taskSnapshot);
|
resp = getUploadTaskAsMap(taskSnapshot);
|
||||||
promise.resolve(resp);
|
promise.resolve(resp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue