mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-02 11:40:05 +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 }
|
||||
}
|
||||
|
||||
getFolder(model) {
|
||||
return model.substring(0, model.lastIndexOf('/') + 1)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {Array<string>} models
|
||||
*/
|
||||
@ -607,7 +603,8 @@ class ModelDropdown
|
||||
if (isRootFolder) {
|
||||
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(
|
||||
model,
|
||||
this.createElement('li', { 'data-path': fullPath }, classes, model),
|
||||
|
Loading…
Reference in New Issue
Block a user