Skip to content

Commit 50ea56b

Browse files
committed
New attempt on auto-close
1 parent 6bd2f6f commit 50ea56b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/home/down-git.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ downGitModule.factory('downGitService', [
104104
zip.generateAsync({type:"blob"}).then(function(content) {
105105
saveAs(content, repoInfo.downloadFileName+".zip");
106106
if (autoClose) {
107-
window.close();
107+
setTimeout(function(){window.close();}, 1000);
108108
}
109109
});
110110
});
@@ -134,15 +134,15 @@ downGitModule.factory('downGitService', [
134134
progress.isProcessing.val=false;
135135
saveAs(new Blob([file.data]), repoInfo.downloadFileName);
136136
if (autoClose) {
137-
window.close();
137+
setTimeout(function(){window.close();}, 1000);
138138
}
139139
} else {
140140
zip.file(repoInfo.rootName, file.data);
141141
progress.isProcessing.val=false;
142142
zip.generateAsync({type:"blob"}).then(function(content) {
143143
saveAs(content, repoInfo.downloadFileName+".zip");
144144
if (autoClose) {
145-
window.close();
145+
setTimeout(function(){window.close();}, 1000);
146146
}
147147
});
148148
}

0 commit comments

Comments
 (0)