mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-08 22:49:18 +01:00
Remove leading slash from data-path attributes
This commit is contained in:
parent
df93fee034
commit
09c1dfd92b
@ -495,10 +495,6 @@ class ModelDropdown
|
|||||||
return { width, height }
|
return { width, height }
|
||||||
}
|
}
|
||||||
|
|
||||||
getFolder(model) {
|
|
||||||
return model.substring(0, model.lastIndexOf('/') + 1)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Array<string>} models
|
* @param {Array<string>} models
|
||||||
*/
|
*/
|
||||||
@ -607,7 +603,8 @@ class ModelDropdown
|
|||||||
if (isRootFolder) {
|
if (isRootFolder) {
|
||||||
classes.push('in-root-folder')
|
classes.push('in-root-folder')
|
||||||
}
|
}
|
||||||
const fullPath = `${folderName || ''}/${model}`
|
// Remove the leading slash from the model path
|
||||||
|
const fullPath = folderName ? `${folderName.substring(1)}/${model}` : model
|
||||||
modelsMap.set(
|
modelsMap.set(
|
||||||
model,
|
model,
|
||||||
this.createElement('li', { 'data-path': fullPath }, classes, model),
|
this.createElement('li', { 'data-path': fullPath }, classes, model),
|
||||||
|
Loading…
Reference in New Issue
Block a user