minor fixes

pull/1367/head
Rich Harris 7 years ago
parent 86d3476b55
commit c3c7970dc9

@ -160,8 +160,8 @@ export default class Attribute extends Node {
hasChangeableIndex = Array.from(indexes).some(index => block.changeableIndexes.get(index));
shouldCache = (
expression.type !== 'Identifier' ||
block.contexts.has(expression.name) ||
expression.node.type !== 'Identifier' ||
block.contexts.has(expression.node.name) ||
hasChangeableIndex
);
} else {

@ -43,7 +43,7 @@ export default class Title extends Node {
block.contexts.has(expression.name)
);
} else {
// '{{foo}} {{bar}}' — treat as string concatenation
// '{foo} {bar}' — treat as string concatenation
value =
(this.children[0].type === 'Text' ? '' : `"" + `) +
this.children
@ -57,7 +57,7 @@ export default class Title extends Node {
allDependencies.add(d);
});
return getExpressionPrecedence(chunk.node) <= 13 ? `(${snippet})` : snippet;
return getExpressionPrecedence(chunk.expression.node) <= 13 ? `(${snippet})` : snippet;
}
})
.join(' + ');

@ -164,8 +164,9 @@ function create_main_fragment(component, ctx) {
insertNode(button, target, anchor);
},
p: function(changed, _ctx) {
p: function update(changed, _ctx) {
ctx = _ctx;
},
u: function unmount() {

@ -1,5 +1,5 @@
/* generated by Svelte vX.Y.Z */
import { assign, createElement, detachNode, init, insertNode, noop, proto } from "svelte/shared.js";
import { assign, createElement, detachNode, init, insertNode, proto } from "svelte/shared.js";
function foo( node, callback ) {
// code goes here
@ -33,6 +33,7 @@ function create_main_fragment(component, ctx) {
p: function update(changed, _ctx) {
ctx = _ctx;
},
u: function unmount() {

Loading…
Cancel
Save