Skip to content

Commit

Permalink
use localStorage if default uploads location is set to root
Browse files Browse the repository at this point in the history
  • Loading branch information
i-just committed Feb 14, 2024
1 parent 9259bb8 commit 6cde38d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/assets/cp/dist/cp.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/web/assets/cp/src/js/BaseElementIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ Craft.BaseElementIndex = Garnish.Base.extend(

const sourcePath = this.getDefaultSourcePath();

// If no default source path was explicitly configured, use the localStorage key
if (!sourcePath && stepKey) {
// If no default source path was explicitly configured, or it's set to the root of the volume, use the localStorage key
if ((!sourcePath || sourcePath.length == 1) && stepKey) {
this.loadSourcePathByKey(stepKey).then((sourcePath) => {
if (sourcePath) {
// Filter out any source path steps that are above the source's root
Expand Down

0 comments on commit 6cde38d

Please sign in to comment.