Skip to content

Commit 332b4ae

Browse files
committed
fix testing for undefined
Signed-off-by: Florian Schunk <[email protected]>
1 parent ecb9364 commit 332b4ae

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

apps/files/js/fileactions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@
649649
actions = OC.dialogs.FILEPICKER_TYPE_COPY_MOVE;
650650
}
651651
var dialogDir = context.dir;
652-
if (context.fileList.dirInfo.dirLastCopiedTo != undefined) {
652+
if (typeof context.fileList.dirInfo.dirLastCopiedTo !== 'undefined') {
653653
dialogDir = context.fileList.dirInfo.dirLastCopiedTo;
654654
}
655655
OC.dialogs.filepicker(t('files', 'Choose target folder'), function(targetPath, type) {

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 & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -215,9 +215,7 @@ var OCdialogs = {
215215
this.filepicker.filesClient = (OCA.Sharing && OCA.Sharing.PublicApp && OCA.Sharing.PublicApp.fileList)? OCA.Sharing.PublicApp.fileList.filesClient: OC.Files.getClient();
216216

217217
this.filelist = null;
218-
if (path == undefined) {
219-
path = '';
220-
}
218+
path = path || '';
221219

222220
$.when(this._getFilePickerTemplate()).then(function($tmpl) {
223221
self.filepicker.loading = false;
@@ -236,14 +234,9 @@ var OCdialogs = {
236234
self.$filePicker = $tmpl.octemplate({
237235
dialog_name: dialogName,
238236
title: title,
239-
<<<<<<< HEAD
240237
emptytext: emptyText,
241238
newtext: newText
242-
}).data('path', '').data('multiselect', multiselect).data('mimetype', mimetypeFilter);
243-
=======
244-
emptytext: emptyText
245239
}).data('path', path).data('multiselect', multiselect).data('mimetype', mimetypeFilter);
246-
>>>>>>> copy Dialog starts in current directory
247240

248241
if (modal === undefined) {
249242
modal = false;

0 commit comments

Comments
 (0)