handling of ref objects as component fields 🐛
**Describe the bug** 🐛
The fields of ref objects are compiling as null where they weren't before.

**To Reproduce** 👨‍🔬

```

type counterObject* = ref object
  count*: int
  settings*: string

var counterObj1*: counterObject
var counterObj2*: counterObject
proc nextCounter*(c: counterObject): int =
  c.count += 1
  result = c.count

component withCounterObject:
  counter: counterObject = counterObj1
  count: int = nextCounter(counter)
  `template`:
    tDiv: "self count: {self.count}"
    tDiv: "count in template: {nextCounter(counterObj2)}"


appRoutes("ROOT"):
  "/":
    for i in 1..5:
      withCounterObject

```

Code currently compiles but console log indicates that `count` is now null. 

```
 Uncaught TypeError: Cannot read properties of null (reading 'count')
    at nextCounter_2936012847

```
**Expected behavior** 🤔
Code should compile a counter component that can accept different counters to increment.

@#head, [3633cdc](https://github.com/HapticX/happyx/commit/3633cdc9a7990164da5c38454b3c4fb61cb33b0e)