supermedium / superframe

:package: A super collection of A-Frame components.
https://supermedium.com/superframe/
MIT License
1.38k stars 424 forks source link

[template] case mustache return handlebars compiler #329

Open isaac-pj opened 1 year ago

isaac-pj commented 1 year ago

The package aframe-template-component in npm version 3.2.1

When i try to render mustache template an error is throwed out on console.

mustache.min.js:1 Uncaught (in promise) TypeError: Invalid template! Template should be a "string" but "function" was given as the first argument for mustache#render(template, view, partials)
    at Object.render (mustache.min.js:1:9011)
    at renderTemplate (index.js:109:23)
    at n.renderTemplate (index.js:78:28)

checking the index.js at line :184 i see that the case is wrongly returning handlebars compiler for mustache case

    case MUSTACHE: {
      return compileHandlebarsTemplate;
    }

I see that the problem was fixed on this commit 4d1a49b 6 years before, but the package was published in last 3 months and the bug there is.

vincentfretin commented 1 year ago

3.2.2 was published https://www.npmjs.com/package/aframe-template-component I guess you can close the issue?