Skip to content

Commit

Permalink
getPlayerState 'Map already consumed' error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
srfaytkn authored and cjam committed May 7, 2021
1 parent e2f8124 commit c0b1d4c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ private void getPlayerStateInternal(CallResult.ResultCallback<ReadableMap> resul
mSpotifyAppRemote.getPlayerApi().getPlayerState()
.setResultCallback(playerState -> {
WritableMap map = Convert.toMap(playerState);
sendEvent("playerStateChanged", map);
WritableMap eventMap = Convert.toMap(playerState);
sendEvent("playerStateChanged", eventMap);
resultCallback.onResult(map);
})
.setErrorCallback(errorCallback);
Expand Down

0 comments on commit c0b1d4c

Please sign in to comment.