mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-03 03:40:12 +08:00
Bugfix: Fix potential nil dereference
This commit is contained in:
parent
ff8e701793
commit
613a9e3143
@ -426,7 +426,9 @@ func FindPathToFile(fsys fs.FS, file string) (string, error) {
|
||||
path, _ := filepath.Split(selected)
|
||||
return path, nil
|
||||
}
|
||||
|
||||
path, _ := filepath.Split(indexFiles.AsSlice()[0])
|
||||
return path, nil
|
||||
if indexFiles.Length() > 0 {
|
||||
path, _ := filepath.Split(indexFiles.AsSlice()[0])
|
||||
return path, nil
|
||||
}
|
||||
return "", fmt.Errorf("no index.html found")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user