Skip to content

Numbers and booleans aren’t replaced correctly #106

@gryzzly

Description

@gryzzly

Describe the bug

When passing a boolean or number, I am seeing the variable type in the rendered output, i.e.

1__number
false__boolean

Steps To Reproduce
See https://jsfiddle.net/fev3zko2/
with the following code:

<my-component></my-component>
import Tonic from 'https://cdn.jsdelivr.net/npm/@socketsupply/[email protected]/+esm'

const numberValue = 1;
const booleanValue = true;
const stringValue = 'lorem ipsum';

class MyComponent extends Tonic {
	render() {
  	return this.html`<ul>
    	<li>Number ${numberValue}</li>
      <li>Boolean ${booleanValue}</li>
      <li>String ${stringValue}</li>
    </ul>`;
  }
}

Tonic.add(MyComponent);

This seems to happen in every browser that I tested with.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NEEDS DOCSThe issue represents a lack of documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions