template-lint icon indicating copy to clipboard operation
template-lint copied to clipboard

repeat.for should check if it gets an iterable collection

Open zakjan opened this issue 8 years ago • 0 comments

class TestViewModel {
    value: number;
    nullableCollection: string[] | undefined;
}

<template>
    <template repeat.for="item of value">${item}</template> <!-- should warn -->
    <template repeat.for="item of nullableCollection">${item}</template> <!-- should warn -->
    <template if.bind="nullableCollection">
        <template repeat.for="item of nullableCollection">${item}</template> <!-- ok -->
    </template>
</template>

zakjan avatar Dec 05 '16 21:12 zakjan