riot jsfiddle breaks when adding a tag function

91 views Asked by At

This fiddle is broken. Remove the oops function to fix it. What do I do when I need the oops function? https://jsfiddle.net/mvvapzub/1/

oops(e) {

}

Here is a fiddle that has a riot function (isFolder) and it's not broken. https://jsfiddle.net/walkermatt/1vdo5pmf/1/

1

There are 1 answers

0
Garfield On

Fixed by indenting everything inside the script tag

https://jsfiddle.net/mvvapzub/3/

/// this does NOT work
<script type="riot/tag">
<app>
    <table>
        ...
    </table>

    ...

    oops(e) {
        return true
    }

</app>
</script>

.

/// this works
<script type="riot/tag">
    <app>
        <table>
            ...
        </table>

        ...

        oops(e) {
            return true
        }

    </app>
</script>