devpunks / snuggsi

snuggsi ツ - Easy Custom Elements in ~1kB
https://snuggsi.com
MIT License
398 stars 17 forks source link

🐞 bug found 11/22/17: snuggsi.min.js:1 Uncaught TypeError: e[n].map is not a function #157

Closed johnrlive closed 6 years ago

johnrlive commented 7 years ago
  1. Console error:

menu-item

snuggsi.min.js:1 Uncaught TypeError: e[n].map is not a function
    at TokenList.bind (snuggsi.min.js:1)
    at HTMLElement.Custom.n.render (snuggsi.min.js:1)
    at HTMLElement.Custom.n.connectedCallback (snuggsi.min.js:1)
    at t.upgrade (snuggsi.min.js:1)
    at Array.map (<anonymous>)
    at t.define (snuggsi.min.js:1)
    at snuggsi.min.js:1
    at index.html:16
  1. index.html attached

index_html_ _components

<!DOCTYPE html>
<script src=https://unpkg.com/snuggsi></script>
<title>menu-item</title>

<menu-item>
<header>
    {name}
</header>

</menu-item>

<script>

    Element `menu-item`
    (class extends HTMLElement{
        onconnect(event) {
            alert(this)
        }
    get name() { return "Ice Tea" }
    })

</script>
snuggs commented 7 years ago

@johnrlive 🙏 thanks for this.

johnrlive commented 7 years ago

@snuggs my pleasure homie! 🙏

mrbernnz commented 6 years ago

@snuggs Do you mind if I jump on this?

snuggs commented 6 years ago

@mrbernnz DO IT DO IT! Don't ask for permission.... apologize for mistakes. @tmornini taught me ;-)

snuggs commented 6 years ago

@mrbernnz @johnrlive Fixed in https://github.com/devpunks/snuggsi/commit/6267e1beccd4512a0572ebf62eeda34ebda62abf