From 0cb42fbcf3e880070f9042ae9d5a1d809f4dcaec Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 29 Aug 2019 16:38:57 -0400 Subject: [PATCH] wip: make runtime-test nodes non-observable --- packages/runtime-test/src/nodeOps.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/runtime-test/src/nodeOps.ts b/packages/runtime-test/src/nodeOps.ts index 7de1ab774c..be98f9fcba 100644 --- a/packages/runtime-test/src/nodeOps.ts +++ b/packages/runtime-test/src/nodeOps.ts @@ -1,3 +1,5 @@ +import { markNonReactive } from '@vue/reactivity' + export const enum NodeTypes { TEXT = 'text', ELEMENT = 'element', @@ -85,6 +87,8 @@ function createElement(tag: string): TestElement { targetNode: node, tag }) + // avoid test nodes from being observed + markNonReactive(node) return node } @@ -101,6 +105,8 @@ function createText(text: string): TestText { targetNode: node, text }) + // avoid test nodes from being observed + markNonReactive(node) return node } @@ -117,6 +123,8 @@ function createComment(text: string): TestComment { targetNode: node, text }) + // avoid test nodes from being observed + markNonReactive(node) return node } -- 2.47.3