Skip to content

Commit

Permalink
Use merged settings when looking for upload url
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-lenz committed Oct 4, 2023
1 parent 09444c1 commit 06bc72b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/assets/resources/fileupload.patch.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ Craft.Uploader = (function(uploader) {
init: function($element, settings) {
uploader.prototype.init.call(this, $element, settings);

var resolvedSettings = this.settings || settings;
if (
'url' in settings &&
'url' in resolvedSettings &&
saveActions.some(function(saveAction) {
return decodeURIComponent(settings.url).indexOf(saveAction) !== -1;
return decodeURIComponent(resolvedSettings.url).indexOf(saveAction) !== -1;
})
) {
this.isSaveAction = true;
Expand Down

0 comments on commit 06bc72b

Please sign in to comment.