Skip to content

Commit 236b3ed

Browse files
committed
fix testing for undefined
Signed-off-by: Florian Schunk <florian.schunk@rwth-aachen.de>
1 parent 00032b2 commit 236b3ed

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

apps/files/js/filelist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@
919919

920920
var actions = this.isSelectedMovable() ? OC.dialogs.FILEPICKER_TYPE_COPY_MOVE : OC.dialogs.FILEPICKER_TYPE_COPY;
921921
var dialogDir = self.getCurrentDirectory();
922-
if (self.dirInfo.dirLastCopiedTo != undefined) {
922+
if (typeof self.dirInfo.dirLastCopiedTo !== undefined) {
923923
dialogDir = self.dirInfo.dirLastCopiedTo;
924924
}
925925
OC.dialogs.filepicker(t('files', 'Choose target folder'), function(targetPath, type) {

core/js/oc-dialogs.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,7 @@ var OCdialogs = {
213213
this.filepicker.loading = true;
214214
this.filepicker.filesClient = (OCA.Sharing && OCA.Sharing.PublicApp && OCA.Sharing.PublicApp.fileList)? OCA.Sharing.PublicApp.fileList.filesClient: OC.Files.getClient();
215215

216-
if (path == undefined) {
217-
path = '';
218-
}
216+
path = path || '';
219217

220218
$.when(this._getFilePickerTemplate()).then(function($tmpl) {
221219
self.filepicker.loading = false;

0 commit comments

Comments
 (0)