justin-schroeder/arrow-js

Rewrite a reactive property which has $on event throw error

muzichen opened this issue · 0 comments

import { reactive } from "@arrow-js/core";

const data1 = reactive({
  a: 123
});

const data2 = reactive({
  b: 123
});

data2.$on('b', (value) => {
  console.log(value);
})

data1.b = data2;
data1.b = 123;

Above code throw TypeError: Reflect.get called on non-object error