HuckRidgeSW / hvue

A GopherJS & go/wasm binding for Vue.js
MIT License
49 stars 10 forks source link

Bug in examples/04-computed-with-setter #2

Closed lpuigo closed 6 years ago

lpuigo commented 6 years ago

Hi @HuckRidgeSW

Thank you for this Vue.js wrap with GopherJS.

I'm diving in hvue and found an error message in example 04-computed-with-setter : the "Foo bar" text do not get updated, and I got the following message in console :

Uncaught Error: Unknown data slot set: fullName
    at $callDeferred (04-computed-with-setter.js:1412)
    at $panic (04-computed-with-setter.js:1451)
    at Object.$packages.github.com/huckridgesw/hvue.VM.ptr.Set (vm.go:322)
    at Object.main [as $blk] (main.go:43)
    at Object.$init [as $blk] (04-computed-with-setter.js:11835)

... comming for the following line (I guess) : vm.Set("fullName", "First Middle Last")

lpuigo commented 6 years ago

after a few tries and error : works fine when using vm.Object.Set("fullName", "First Middle Last")

HuckRidgeSW commented 6 years ago

Good catch! Thanks for the bug report. This is fixed; 04-computed-with-setter now no longer panics and works as-is with vm.Set instead of vm.Object.Set.