Use substring instead of deprecated substr

This commit is contained in:
Aarni Koskela
2023-04-30 22:15:59 +03:00
parent 4bb441bb08
commit c714300265
3 changed files with 5 additions and 5 deletions

View File

@@ -351,7 +351,7 @@ onUiUpdate(function(){
onOptionsChanged(function(){
var elem = gradioApp().getElementById('sd_checkpoint_hash')
var sd_checkpoint_hash = opts.sd_checkpoint_hash || ""
var shorthash = sd_checkpoint_hash.substr(0,10)
var shorthash = sd_checkpoint_hash.substring(0,10)
if(elem && elem.textContent != shorthash){
elem.textContent = shorthash