Evaluate component attrs before use

This commit is contained in:
Zaid Abdulla committed 2021-10-24 18:17:03 -07:00
1 parent 73baffc3b9
commit 88a84788a5
7 files changed
+26 -16

No files matched your search

+2 -1
View File
@@ -23,6 +23,7 @@ import * as taskQueue from "../task-queue";
import { parse } from "../../lib/common/expression-parser";
import memoize from "../../lib/common/memoize";
import { getIcon } from "../icons";
import { evaluateExpression } from "../store";
const memoizedParse = memoize(parse);
@@ -55,7 +56,7 @@ const component: ClosureComponent = (): Component => {
view: (vnode) => {
const device = vnode.attrs["device"];
const limit = vnode.attrs["limit"] > 0 ? vnode.attrs["limit"] : 100;
const limit = evaluateExpression(vnode.attrs["limit"], device) || 100;
const search = m("input", {
type: "text",