mirror of
https://github.com/wavetermdev/wails.git
synced 2026-08-05 13:53:43 -07:00
Bugfix: Fix potential nil dereference
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user