fix(ssr): remove missing ssr directive transform error

This commit is contained in:
Evan You
2022-01-16 15:20:56 +08:00
parent 4dd0f34e81
commit 55cc4af25e
2 changed files with 3 additions and 13 deletions

View File

@@ -179,18 +179,10 @@ export const ssrTransformElement: NodeTransform = (node, context) => {
if (!hasDynamicVBind) {
node.children = [createInterpolation(prop.exp, prop.loc)]
}
} else {
} else if (!hasDynamicVBind) {
// Directive transforms.
const directiveTransform = context.directiveTransforms[prop.name]
if (!directiveTransform) {
// no corresponding ssr directive transform found.
context.onError(
createSSRCompilerError(
SSRErrorCodes.X_SSR_CUSTOM_DIRECTIVE_NO_TRANSFORM,
prop.loc
)
)
} else if (!hasDynamicVBind) {
if (directiveTransform) {
const { props, ssrTagParts } = directiveTransform(
prop,
node,