Merge pull request #1050 from TaopaiC/remote-input-alloweddatatypes

fix allowedDataTypes in fromNativeAndroidRemoteInput
This commit is contained in:
Chris Bianca 2018-05-04 16:23:20 +01:00 committed by GitHub
commit 5f21ddc0fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -103,9 +103,9 @@ export const fromNativeAndroidRemoteInput = (
nativeRemoteInput: NativeAndroidRemoteInput
): AndroidRemoteInput => {
const remoteInput = new AndroidRemoteInput(nativeRemoteInput.resultKey);
if (nativeRemoteInput.allowDataType) {
for (let i = 0; i < nativeRemoteInput.allowDataType.length; i++) {
const allowDataType = nativeRemoteInput.allowDataType[i];
if (nativeRemoteInput.allowedDataTypes) {
for (let i = 0; i < nativeRemoteInput.allowedDataTypes.length; i++) {
const allowDataType = nativeRemoteInput.allowedDataTypes[i];
remoteInput.setAllowDataType(allowDataType.mimeType, allowDataType.allow);
}
}