[CLEANUP] run prettier on some code

This commit is contained in:
Géry Debongnie
2019-09-04 22:48:37 +02:00
parent 3c23a7b246
commit fe46a6ccee
3 changed files with 6 additions and 8 deletions
+1 -1
View File
@@ -254,7 +254,7 @@ QWeb.addDirective({
let event = fullName.includes(".lazy") ? "change" : "input"; let event = fullName.includes(".lazy") ? "change" : "input";
if (node.tagName === "select") { if (node.tagName === "select") {
ctx.addLine(`p${nodeID}.props = {value: context.state['${value}']};`); ctx.addLine(`p${nodeID}.props = {value: context.state['${value}']};`);
addNodeHook('create', `n.elm.value=context.state['${value}'];`) addNodeHook("create", `n.elm.value=context.state['${value}'];`);
event = "change"; event = "change";
handler = `(ev) => {context.state['${value}'] = ev.target.value}`; handler = `(ev) => {context.state['${value}'] = ev.target.value}`;
} else if (type === "checkbox") { } else if (type === "checkbox") {
+4 -4
View File
@@ -97,10 +97,10 @@ export function debounce(func: Function, wait: number, immediate?: boolean): Fun
} }
export function shallowEqual(p1, p2): boolean { export function shallowEqual(p1, p2): boolean {
for (let k in p1) { for (let k in p1) {
if (p1[k] !== p2[k]) { if (p1[k] !== p2[k]) {
return false; return false;
} }
} }
return true; return true;
} }
+1 -3
View File
@@ -1395,9 +1395,7 @@ describe("composition", () => {
} }
const parent = new Parent(env); const parent = new Parent(env);
await parent.mount(fixture); await parent.mount(fixture);
expect(fixture.innerHTML).toBe( expect(fixture.innerHTML).toBe("<div><div><span>asdf</span><span>asdf</span></div></div>");
"<div><div><span>asdf</span><span>asdf</span></div></div>"
);
}); });
test("t-component with dynamic value", async () => { test("t-component with dynamic value", async () => {