File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,12 @@ func (l *Lua) Delete() error {
41
41
42
42
// LoadLuas load all lua scripts
43
43
func LoadLuas (luas * []Lua ) error {
44
- var byts [][]byte
45
- if err := GlobalStorage .ReadAll (luaStorageCollection , & byts ); err != nil {
44
+ var bytes [][]byte
45
+ if err := GlobalStorage .ReadAll (luaStorageCollection , & bytes ); err != nil {
46
46
return err
47
47
}
48
48
49
- if err := RecordsToStruct (byts , luas ); err != nil {
49
+ if err := RecordsToStruct (bytes , luas ); err != nil {
50
50
return err
51
51
}
52
52
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ export const Luas = (props: ILuaProps) => {
25
25
setError ( undefined ) ;
26
26
setLoading ( true ) ;
27
27
loadLuas ( connection . id )
28
- . then ( ( v : Lua [ ] ) => setLuas ( v ) )
28
+ . then ( ( v : Lua [ ] ) => setLuas ( v || [ ] ) )
29
29
. catch ( ( err : Error ) => { setError ( err ) ; } )
30
30
. finally ( ( ) => { setLoading ( false ) } ) ;
31
31
} , [ connection . id ] )
You can’t perform that action at this time.
0 commit comments