stamp icon indicating copy to clipboard operation
stamp copied to clipboard

Collision add-on unaware of get/set methods?

Open canadaduane opened this issue 4 years ago • 5 comments

I have a stamp with a method that uses get style function:

  methods: {
    /**
     * @returns {string}
     */
    get label() {
      return this.state.label.target
    },
    ...

I also have a few methods that I am trying to set up for defer style collision so that they are all called (instead of the last one).

It appears that when I use these two features together, I get an error that this.state is undefined. Using console.trace I am lead believe that this line of code is "calling" my getter:

https://github.com/stampit-org/stamp/blob/master/packages/collision/index.js#L146

canadaduane avatar Apr 06 '20 20:04 canadaduane

Hm. Could you please provide a (stripped?) code to reproduce it locally? That would significantly help.

On Tue., 7 Apr. 2020, 06:43 Duane Johnson, [email protected] wrote:

I have a stamp with a method that uses get style function:

methods: { /** * @returns {string} */ get label() { return this.state.label.target }, ...

I also have a few methods that I am trying to set up for defer style collision so that they are all called (instead of the last one).

It appears that when I use these two features together, I get an error that this.state is undefined. Using console.trace I believe that this line of code is "calling" my getter:

https://github.com/stampit-org/stamp/blob/master/packages/collision/index.js#L146

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/stampit-org/stamp/issues/79, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMMEL43MATKDY7Y33HAQJLRLI5IJANCNFSM4MCSWOAA .

koresar avatar Apr 06 '20 21:04 koresar

Oh! I see now. It calls the getter. Shite! 😀 That's definitely a big. Thank you for reporting. It's clear how to reproduce.

koresar avatar Apr 06 '20 21:04 koresar

Ha! Yes, that's the one. Thanks for taking a look.

canadaduane avatar Apr 06 '20 22:04 canadaduane

Is this something that you have time to fix? I just ran into this issue again.

canadaduane avatar Jun 13 '20 18:06 canadaduane

Sorry. I hadn't had a chance. It's a difficult one. Also, I have a baby now. Taking my whole time atm.

On Sun., 14 Jun. 2020, 04:09 Duane Johnson, [email protected] wrote:

Is this something that you have time to fix? I just ran into this issue again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/stampit-org/stamp/issues/79#issuecomment-643658217, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMMEL6NG5VKD3I7NKMKJWLRWO6G7ANCNFSM4MCSWOAA .

koresar avatar Jun 14 '20 00:06 koresar