remove excess parentheses

pull/857/head
Rich Harris 8 years ago
parent f394cacb99
commit b1cbffece6

@ -44,7 +44,7 @@ export default class CodeBuilder {
this.result += `\n${this.indent}}`; this.result += `\n${this.indent}}`;
} }
this.result += `${this.last === ChunkType.Block ? '\n\n' : '\n'}${this.indent}if ( ${condition} ) {\n${body}`; this.result += `${this.last === ChunkType.Block ? '\n\n' : '\n'}${this.indent}if (${condition}) {\n${body}`;
this.lastCondition = condition; this.lastCondition = condition;
} }

@ -230,7 +230,7 @@ function create_main_fragment(state, component) {
}, },
update: function(changed, state) { update: function(changed, state) {
if ( changed.foo ) { if (changed.foo) {
text.data = state.foo; text.data = state.foo;
} }
}, },

@ -41,7 +41,7 @@ function create_main_fragment(state, component) {
}, },
update: function(changed, state) { update: function(changed, state) {
if ( changed.foo ) { if (changed.foo) {
text.data = state.foo; text.data = state.foo;
} }
}, },

@ -207,7 +207,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
SvelteComponent.prototype._recompute = function _recompute(changed, state, oldState, isInitial) { SvelteComponent.prototype._recompute = function _recompute(changed, state, oldState, isInitial) {
if ( isInitial || changed.x ) { if (isInitial || changed.x) {
if (differs((state.a = template.computed.a(state.x)), oldState.a)) changed.a = true; if (differs((state.a = template.computed.a(state.x)), oldState.a)) changed.a = true;
if (differs((state.b = template.computed.b(state.x)), oldState.b)) changed.b = true; if (differs((state.b = template.computed.b(state.x)), oldState.b)) changed.b = true;
} }

@ -42,7 +42,7 @@ function SvelteComponent(options) {
assign(SvelteComponent.prototype, proto); assign(SvelteComponent.prototype, proto);
SvelteComponent.prototype._recompute = function _recompute(changed, state, oldState, isInitial) { SvelteComponent.prototype._recompute = function _recompute(changed, state, oldState, isInitial) {
if ( isInitial || changed.x ) { if (isInitial || changed.x) {
if (differs((state.a = template.computed.a(state.x)), oldState.a)) changed.a = true; if (differs((state.a = template.computed.a(state.x)), oldState.a)) changed.a = true;
if (differs((state.b = template.computed.b(state.x)), oldState.b)) changed.b = true; if (differs((state.b = template.computed.b(state.x)), oldState.b)) changed.b = true;
} }

@ -253,7 +253,7 @@ function create_main_fragment(state, component) {
each_block_iterations.length = each_block_value.length; each_block_iterations.length = each_block_value.length;
} }
if ( changed.foo ) { if (changed.foo) {
text_1.data = state.foo; text_1.data = state.foo;
} }
}, },
@ -314,15 +314,15 @@ function create_each_block(state, each_block_value, comment, i, component) {
}, },
update: function(changed, state, each_block_value, comment, i) { update: function(changed, state, each_block_value, comment, i) {
if ( (changed.comments) && text_2_value !== (text_2_value = comment.author) ) { if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
text_2.data = text_2_value; text_2.data = text_2_value;
} }
if ( (changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time)) ) { if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) {
text_4.data = text_4_value; text_4.data = text_4_value;
} }
if ( (changed.comments) && raw_value !== (raw_value = comment.html) ) { if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
detachAfter(raw_before); detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value); raw_before.insertAdjacentHTML("afterend", raw_value);
} }

@ -55,7 +55,7 @@ function create_main_fragment(state, component) {
each_block_iterations.length = each_block_value.length; each_block_iterations.length = each_block_value.length;
} }
if ( changed.foo ) { if (changed.foo) {
text_1.data = state.foo; text_1.data = state.foo;
} }
}, },
@ -116,15 +116,15 @@ function create_each_block(state, each_block_value, comment, i, component) {
}, },
update: function(changed, state, each_block_value, comment, i) { update: function(changed, state, each_block_value, comment, i) {
if ( (changed.comments) && text_2_value !== (text_2_value = comment.author) ) { if ((changed.comments) && text_2_value !== (text_2_value = comment.author)) {
text_2.data = text_2_value; text_2.data = text_2_value;
} }
if ( (changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time)) ) { if ((changed.elapsed || changed.comments || changed.time) && text_4_value !== (text_4_value = state.elapsed(comment.time, state.time))) {
text_4.data = text_4_value; text_4.data = text_4_value;
} }
if ( (changed.comments) && raw_value !== (raw_value = comment.html) ) { if ((changed.comments) && raw_value !== (raw_value = comment.html)) {
detachAfter(raw_before); detachAfter(raw_before);
raw_before.insertAdjacentHTML("afterend", raw_value); raw_before.insertAdjacentHTML("afterend", raw_value);
} }

@ -202,11 +202,11 @@ function create_main_fragment(state, component) {
}, },
update: function(changed, state) { update: function(changed, state) {
if ( changed.color ) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
} }
if ( changed.x || changed.y ) { if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)"); setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
} }
}, },

@ -21,11 +21,11 @@ function create_main_fragment(state, component) {
}, },
update: function(changed, state) { update: function(changed, state) {
if ( changed.color ) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
} }
if ( changed.x || changed.y ) { if (changed.x || changed.y) {
setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)"); setStyle(div, "transform", "translate(" + state.x + "px," + state.y + "px)");
} }
}, },

@ -201,7 +201,7 @@ function create_main_fragment(state, component) {
}, },
update: function(changed, state) { update: function(changed, state) {
if ( changed.data ) { if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
} }
}, },

@ -20,7 +20,7 @@ function create_main_fragment(state, component) {
}, },
update: function(changed, state) { update: function(changed, state) {
if ( changed.data ) { if (changed.data) {
setStyle(div, "background", "url(data:image/png;base64," + state.data + ")"); setStyle(div, "background", "url(data:image/png;base64," + state.data + ")");
} }
}, },

@ -201,7 +201,7 @@ function create_main_fragment(state, component) {
}, },
update: function(changed, state) { update: function(changed, state) {
if ( changed.color ) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
} }
}, },

@ -20,7 +20,7 @@ function create_main_fragment(state, component) {
}, },
update: function(changed, state) { update: function(changed, state) {
if ( changed.color ) { if (changed.color) {
setStyle(div, "color", state.color); setStyle(div, "color", state.color);
} }
}, },

@ -206,11 +206,11 @@ function create_main_fragment(state, component) {
}, },
update: function(changed, state) { update: function(changed, state) {
if ( changed.style ) { if (changed.style) {
div.style.cssText = state.style; div.style.cssText = state.style;
} }
if ( (changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value) ) { if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
div_1.style.cssText = div_1_style_value; div_1.style.cssText = div_1_style_value;
} }
}, },

@ -25,11 +25,11 @@ function create_main_fragment(state, component) {
}, },
update: function(changed, state) { update: function(changed, state) {
if ( changed.style ) { if (changed.style) {
div.style.cssText = state.style; div.style.cssText = state.style;
} }
if ( (changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value) ) { if ((changed.key || changed.value) && div_1_style_value !== (div_1_style_value = "" + state.key + ": " + state.value)) {
div_1.style.cssText = div_1_style_value; div_1.style.cssText = div_1_style_value;
} }
}, },

Loading…
Cancel
Save