Skip to content

GetBaseColor does not return expected color #43

@RxxChance

Description

@RxxChance

It seems that the following code in the WASM wrapper may cause GetBaseColor to ignore theme colors:

Original Code:
cmd/main.go

if len(args) == 3 {
	themeColor := args[2].Int()
	ret["color"] = f.GetBaseColor(args[0].String(), args[1].Int(), &themeColor)
}
ret["color"] = f.GetBaseColor(args[0].String(), args[1].Int(), nil)
return js.ValueOf(ret)

Even when len(args) == 3, the ret["color"] set with the theme color is immediately overwritten by the next line with nil as the theme.
As a result, GetBaseColor always ignores the theme color.

I’m not familiar with Go, so I might be mistaken.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions