From 90556e97c6feebe6e0093b50c06e785a163e64f1 Mon Sep 17 00:00:00 2001 From: PaulMaly Date: Mon, 6 May 2019 14:56:29 +0300 Subject: [PATCH] Make component.$$.dirty just a dictionary To be sure that we won't have any hidden behavior related to a prototype: https://davidwalsh.name/object-create-null --- src/internal/Component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal/Component.js b/src/internal/Component.js index 530a48da59..e4be6aed6e 100644 --- a/src/internal/Component.js +++ b/src/internal/Component.js @@ -48,7 +48,7 @@ function make_dirty(component, key) { if (!component.$$.dirty) { dirty_components.push(component); schedule_update(); - component.$$.dirty = {}; + component.$$.dirty = Object.create(null); } component.$$.dirty[key] = true; } @@ -188,4 +188,4 @@ export class SvelteComponentDev extends SvelteComponent { console.warn(`Component was already destroyed`); // eslint-disable-line no-console }; } -} \ No newline at end of file +}