Skip to content

Commit

Permalink
fix(server/render.js): make able to resolve camelCased local directives
Browse files Browse the repository at this point in the history
SSR directives can be only passed in with 'kebab-case' keys, but Client size rendering can be passed
in with 'camelCale' keys.

fix vuejs#8961
  • Loading branch information
ggtmtmgg committed Dec 1, 2018
1 parent ef8524a commit 64e24f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/render.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* @flow */

import { resolveAsset } from 'core/util/index'
import { escape } from 'web/server/util'
import { SSR_ATTR } from 'shared/constants'
import { RenderContext } from './render-context'
Expand Down Expand Up @@ -324,7 +325,7 @@ function renderStartingTag (node: VNode, context) {
if (dirs) {
for (let i = 0; i < dirs.length; i++) {
const name = dirs[i].name
const dirRenderer = directives[name]
const dirRenderer = resolveAsset(context, 'directives', name, true)
if (dirRenderer && name !== 'show') {
// directives mutate the node's data
// which then gets rendered by modules
Expand Down

0 comments on commit 64e24f1

Please sign in to comment.