Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: error on aborting file selection #951

Merged
merged 4 commits into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/assets/javascripts/ui_models/app_state/files_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ export class FilesState {
? await StreamingFileReader.getFilesFromHandles([fileOrHandle])
: await picker.selectFiles();

if (selectedFiles.length === 0) {
return;
}

const uploadedFiles: SNFile[] = [];

for (const file of selectedFiles) {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
"@reach/tooltip": "^0.16.2",
"@standardnotes/components": "1.7.13",
"@standardnotes/features": "1.35.6",
"@standardnotes/filepicker": "1.10.2",
"@standardnotes/filepicker": "1.10.3",
"@standardnotes/settings": "1.13.1",
"@standardnotes/sncrypto-web": "1.8.0",
"@standardnotes/snjs": "2.92.0",
"@standardnotes/snjs": "2.92.1",
"@zip.js/zip.js": "^2.4.7",
"mobx": "^6.5.0",
"mobx-react-lite": "^3.3.0",
Expand Down
16 changes: 8 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2430,10 +2430,10 @@
"@standardnotes/auth" "^3.18.0"
"@standardnotes/common" "^1.17.0"

"@standardnotes/[email protected].2":
version "1.10.2"
resolved "https://registry.yarnpkg.com/@standardnotes/filepicker/-/filepicker-1.10.2.tgz#4e2d76a327e61c5d864ce6e0597786caa83f2e20"
integrity sha512-+3LCaU7CH5gzZJBd6mXajx4ztdIVax8fqk49poHXRQd/mMIc36cOfCwbLlJeT4X6GL7UMLktieZZQqtG7hmRdw==
"@standardnotes/[email protected].3":
version "1.10.3"
resolved "https://registry.yarnpkg.com/@standardnotes/filepicker/-/filepicker-1.10.3.tgz#7384cf40e5ee6b685ea4773cd7857530f11f9d3a"
integrity sha512-95XYq3f758jiut9L4wmd4pC8UariaWUMuGtZB1NDPWm/qgO9ig117hrL7sMN7NU5hRqdt+f6O9xpO7zOoTblrQ==

"@standardnotes/payloads@^1.4.20":
version "1.4.20"
Expand Down Expand Up @@ -2484,10 +2484,10 @@
buffer "^6.0.3"
libsodium-wrappers "^0.7.9"

"@standardnotes/[email protected].0":
version "2.92.0"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.92.0.tgz#92b926982a014f2584264bfcdb428347f7498c51"
integrity sha512-AlQiF2ToDAOdUdVhc8IGg6F9VCGqUKdWXdOPUzM9gB+vmSNz51cGz3CE0vaO0HfZ7bq7vav9wJ4EFIx8wSD04g==
"@standardnotes/[email protected].1":
version "2.92.1"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.92.1.tgz#2a28dbff01b4982de0e6b2eb52c3438546e643b5"
integrity sha512-dJrVl71jecn64iKcfLTwtgCquZGPx+L96EMAp0v1xGYpNREB9qySJW1kWGQukiMrjXbcJYnB7TKNXoerdD6fOg==
dependencies:
"@standardnotes/applications" "^1.2.6"
"@standardnotes/auth" "^3.18.0"
Expand Down