fix(virtual-backgrounds) fix error if we failed to load the model

If another try is made, show an error notification instead of failing with an
exception.
This commit is contained in:
Saúl Ibarra Corretgé 2021-12-08 11:23:01 +01:00 committed by Saúl Ibarra Corretgé
parent 9b3f254c6b
commit a182f53cdc
1 changed files with 6 additions and 0 deletions

View File

@ -74,6 +74,12 @@ export async function createVirtualBackgroundEffect(virtualBackground: Object, d
return;
}
} else if (isWasmDisabled) {
dispatch(showWarningNotification({
titleKey: 'virtualBackground.backgroundEffectError'
}, NOTIFICATION_TIMEOUT_TYPE.LONG));
return;
}
const modelBufferOffset = tflite._getModelBufferMemoryOffset();