| 230 | } |
| 231 | |
| 232 | function getSlotNode( |
| 233 | node: VNodeCall, |
| 234 | name: string | ExpressionNode, |
| 235 | ): SlotFunctionExpression | undefined { |
| 236 | if ( |
| 237 | node.children && |
| 238 | !isArray(node.children) && |
| 239 | node.children.type === NodeTypes.JS_OBJECT_EXPRESSION |
| 240 | ) { |
| 241 | const slot = node.children.properties.find( |
| 242 | p => p.key === name || (p.key as SimpleExpressionNode).content === name, |
| 243 | ) |
| 244 | return slot && slot.value |
| 245 | } |
| 246 | } |
| 247 | |
| 248 | if (toCache.length && context.transformHoist) { |
| 249 | context.transformHoist(children, context, node) |