]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(ssr): invoke directive created hook during hydration
authorEvan You <yyx990803@gmail.com>
Mon, 24 Aug 2020 21:24:54 +0000 (17:24 -0400)
committerEvan You <yyx990803@gmail.com>
Mon, 24 Aug 2020 21:24:54 +0000 (17:24 -0400)
packages/runtime-core/src/hydration.ts

index aa92891d4b2438b82f37187f58f8b398e49135bd..c2d13a1986d59749710925ba09ba5482b50b3de9 100644 (file)
@@ -244,6 +244,9 @@ export function createHydrationFunctions(
     const { props, patchFlag, shapeFlag, dirs } = vnode
     // skip props & children if this is hoisted static nodes
     if (patchFlag !== PatchFlags.HOISTED) {
+      if (dirs) {
+        invokeDirectiveHook(vnode, null, parentComponent, 'created')
+      }
       // props
       if (props) {
         if (