Do not enter edit mode if user clicked cancel
This commit is contained in:
parent
16beaaf071
commit
5566bcce19
1 changed files with 3 additions and 0 deletions
|
@ -141,6 +141,9 @@ async function pickDirectory(e){
|
||||||
L.DomEvent.preventDefault(e);
|
L.DomEvent.preventDefault(e);
|
||||||
if (!editMode) {
|
if (!editMode) {
|
||||||
dirHandle = await window.showDirectoryPicker({ mode: 'readwrite' });
|
dirHandle = await window.showDirectoryPicker({ mode: 'readwrite' });
|
||||||
|
if (!dirHandle) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
for (i = 0; i < l.length ; i++ ) {
|
for (i = 0; i < l.length ; i++ ) {
|
||||||
console.log(l[i].dirname);
|
console.log(l[i].dirname);
|
||||||
if (l[i].dirname === dirHandle.name) {
|
if (l[i].dirname === dirHandle.name) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue