fix(compiler-ssr/teleport): correct the target prop of teleport (#2053)
This commit is contained in:
@@ -26,6 +26,6 @@ export const enum SSRErrorCodes {
|
||||
export const SSRErrorMessages: { [code: number]: string } = {
|
||||
[SSRErrorCodes.X_SSR_CUSTOM_DIRECTIVE_NO_TRANSFORM]: `Custom directive is missing corresponding SSR transform and will be ignored.`,
|
||||
[SSRErrorCodes.X_SSR_UNSAFE_ATTR_NAME]: `Unsafe attribute name for SSR.`,
|
||||
[SSRErrorCodes.X_SSR_NO_TELEPORT_TARGET]: `No target prop on teleport element.`,
|
||||
[SSRErrorCodes.X_SSR_NO_TELEPORT_TARGET]: `Missing the 'to' prop on teleport element.`,
|
||||
[SSRErrorCodes.X_SSR_INVALID_AST_NODE]: `Invalid AST node during SSR transform.`
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ export function ssrProcessTeleport(
|
||||
node: ComponentNode,
|
||||
context: SSRTransformContext
|
||||
) {
|
||||
const targetProp = findProp(node, 'target')
|
||||
const targetProp = findProp(node, 'to')
|
||||
if (!targetProp) {
|
||||
context.onError(
|
||||
createSSRCompilerError(SSRErrorCodes.X_SSR_NO_TELEPORT_TARGET, node.loc)
|
||||
|
||||
Reference in New Issue
Block a user