expo development app crashes on cancel document pick xlsx file

Hi all,
Using xlsx, expo-document-picker and expo-file-system. Below is my function to select an Excel workbook from device.

Works well when selecting a file, but expo app closes when file selection is cancelled, with no error log

const pickDocument = async () => {
		let result = await DocumentPicker.getDocumentAsync({
			copyToCacheDirectory: true,
			type: [
		if (!result.canceled) {
			let file = result.uri;
			let b64 = await FileSystem.readAsStringAsync(file, {
				encoding: FileSystem.EncodingType.Base64,
			let workbook = XLSX.read(b64, { type: 'base64' });
			let sheet_name_list = workbook.SheetNames;
			let data = XLSX.utils.sheet_to_json(workbook.Sheets[sheet_name_list[0]]);