File tree 5 files changed +12
-9
lines changed
5 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 2
2
3
3
process . env . VUE_ENV = 'server'
4
4
5
+ import { extend } from 'shared/util'
5
6
import modules from './server/modules/index'
6
7
import baseDirectives from './server/directives/index'
7
8
import { isUnaryTag , canBeLeftOpenTag } from './compiler/util'
@@ -13,13 +14,13 @@ export function createRenderer (options?: Object = {}): {
13
14
renderToString : Function ,
14
15
renderToStream : Function
15
16
} {
16
- return _createRenderer ( Object . assign ( { } , options , {
17
+ return _createRenderer ( extend ( extend ( { } , options ) , {
17
18
isUnaryTag,
18
19
canBeLeftOpenTag,
19
20
modules,
20
21
// user can provide server-side implementations for custom directives
21
22
// when creating the renderer.
22
- directives : Object . assign ( baseDirectives , options . directives )
23
+ directives : extend ( baseDirectives , options . directives )
23
24
} ) )
24
25
}
25
26
Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ import { escape } from '../util'
4
4
5
5
import {
6
6
isDef ,
7
- isUndef
7
+ isUndef ,
8
+ extend
8
9
} from 'shared/util'
9
10
10
11
import {
@@ -22,7 +23,7 @@ export default function renderAttrs (node: VNodeWithData): string {
22
23
let parent = node . parent
23
24
while ( isDef ( parent ) ) {
24
25
if ( isDef ( parent . data ) && isDef ( parent . data . attrs ) ) {
25
- attrs = Object . assign ( { } , attrs , parent . data . attrs )
26
+ attrs = extend ( extend ( { } , attrs ) , parent . data . attrs )
26
27
}
27
28
parent = parent . parent
28
29
}
Original file line number Diff line number Diff line change 2
2
3
3
import VNode from 'core/vdom/vnode'
4
4
import { renderAttr } from './attrs'
5
- import { isDef , isUndef } from 'shared/util'
5
+ import { isDef , isUndef , extend } from 'shared/util'
6
6
import { propsToAttrMap , isRenderableAttr } from '../util'
7
7
8
8
export default function renderDOMProps ( node : VNodeWithData ) : string {
@@ -12,7 +12,7 @@ export default function renderDOMProps (node: VNodeWithData): string {
12
12
let parent = node . parent
13
13
while ( isDef ( parent ) ) {
14
14
if ( parent . data && parent . data . domProps ) {
15
- props = Object . assign ( { } , props , parent . data . domProps )
15
+ props = extend ( extend ( { } , props ) , parent . data . domProps )
16
16
}
17
17
parent = parent . parent
18
18
}
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export function installSSRHelpers (vm: Component) {
23
23
while ( Ctor . super ) {
24
24
Ctor = Ctor . super
25
25
}
26
- Object . assign ( Ctor . prototype , {
26
+ extend ( Ctor . prototype , {
27
27
_ssrEscape : escape ,
28
28
_ssrNode : renderStringNode ,
29
29
_ssrList : renderStringList ,
Original file line number Diff line number Diff line change 3
3
import {
4
4
isDef ,
5
5
isUndef ,
6
- isTrue
6
+ isTrue ,
7
+ extend
7
8
} from 'shared/util'
8
9
9
10
import { escape } from 'web/server/util'
@@ -29,7 +30,7 @@ const normalizeRender = vm => {
29
30
const { render, template, _scopeId } = vm . $options
30
31
if ( isUndef ( render ) ) {
31
32
if ( template ) {
32
- Object . assign ( vm . $options , ssrCompileToFunctions ( template , {
33
+ extend ( vm . $options , ssrCompileToFunctions ( template , {
33
34
scopeId : _scopeId
34
35
} ) )
35
36
} else {
You can’t perform that action at this time.
0 commit comments