Skip to content

Commit cc8d539

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

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ var OCdialogs = {
218218
if (path == undefined) {
219219
path = '';
220220
}
221+
path = path || '';
221222

222223
$.when(this._getFilePickerTemplate()).then(function($tmpl) {
223224
self.filepicker.loading = false;
@@ -236,14 +237,9 @@ var OCdialogs = {
236237
self.$filePicker = $tmpl.octemplate({
237238
dialog_name: dialogName,
238239
title: title,
239-
<<<<<<< HEAD
240240
emptytext: emptyText,
241241
newtext: newText
242-
}).data('path', '').data('multiselect', multiselect).data('mimetype', mimetypeFilter);
243-
=======
244-
emptytext: emptyText
245242
}).data('path', path).data('multiselect', multiselect).data('mimetype', mimetypeFilter);
246-
>>>>>>> copy Dialog starts in current directory
247243

248244
if (modal === undefined) {
249245
modal = false;

0 commit comments

Comments
 (0)