Merge pull request #2357 from sveltejs/conditional-text-updates-2

Update text.data only when necessary
pull/2364/head
Rich Harris 6 years ago committed by GitHub
commit 1f5293810f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -154,7 +154,8 @@ export function claim_text(nodes, data) {
}
export function set_data(text, data) {
text.data = '' + data;
data = '' + data;
if (text.data !== data) text.data = data;
}
export function set_input_type(input, type) {
@ -236,4 +237,4 @@ export function custom_event(type, detail) {
const e = document.createEvent('CustomEvent');
e.initCustomEvent(type, false, false, detail);
return e;
}
}

Loading…
Cancel
Save