add return statements for rejection paths

This commit is contained in:
jade 2025-01-10 20:08:38 -07:00
parent 213f6ae7dc
commit b0569323e8
2 changed files with 2 additions and 3 deletions

View File

@ -93,9 +93,8 @@ class InitializeCameraPlugin implements JsPsychPlugin<Info> {
try {
await this.askForPermission(trial);
} catch (e) {
// TODO: does not properly display rejection message
this.rejectPermission(trial);
return;
return null;
}
this.showCameraSelection(display_element, trial);

View File

@ -69,7 +69,7 @@ class InitializeMicrophonePlugin implements JsPsychPlugin<Info> {
await this.askForPermission();
} catch(e) {
this.rejectPermission(trial);
return;
return null;
}
this.showMicrophoneSelection(display_element, trial);