File tree 4 files changed +17
-8
lines changed
4 files changed +17
-8
lines changed Original file line number Diff line number Diff line change 1
- import configuration from '../configuration'
1
+ import { setConfiguration } from '../configuration'
2
2
3
3
const tune = {
4
4
allowSFC : false ,
@@ -7,7 +7,7 @@ const tune = {
7
7
export const preactAdapter = ( instance , resolveType ) => {
8
8
const oldHandler = instance . options . vnode
9
9
10
- Object . assign ( configuration , tune )
10
+ setConfiguration ( tune )
11
11
12
12
instance . options . vnode = vnode => {
13
13
vnode . nodeName = resolveType ( vnode . nodeName )
Original file line number Diff line number Diff line change @@ -44,4 +44,13 @@ export const internalConfiguration = {
44
44
disableProxyCreation : false ,
45
45
}
46
46
47
+ export const setConfiguration = config => {
48
+ // not using Object.assing for IE11 compliance
49
+ for ( const i in config ) {
50
+ if ( config . hasOwnProperty ( i ) ) {
51
+ configuration [ i ] = config [ i ]
52
+ }
53
+ }
54
+ }
55
+
47
56
export default configuration
Original file line number Diff line number Diff line change @@ -36,10 +36,10 @@ const markUpdate = ({ fiber }) => {
36
36
}
37
37
38
38
if ( fiber . memoizedProps && typeof fiber . memoizedProps === 'object' ) {
39
- fiber . memoizedProps = Object . assign (
40
- { cacheBusterProp : true } ,
41
- fiber . memoizedProps ,
42
- )
39
+ fiber . memoizedProps = {
40
+ cacheBusterProp : true ,
41
+ ... fiber . memoizedProps ,
42
+ }
43
43
}
44
44
}
45
45
Original file line number Diff line number Diff line change 3
3
getProxyByType ,
4
4
setComponentOptions ,
5
5
} from './reconciler/proxies'
6
- import configuration from './configuration'
6
+ import { setConfiguration } from './configuration'
7
7
import { hotComponentCompare } from './reconciler/componentComparator'
8
8
9
9
const getProxyOrType = type => {
@@ -25,4 +25,4 @@ export const cold = type => {
25
25
export const configureComponent = ( component , options ) =>
26
26
setComponentOptions ( component , options )
27
27
28
- export const setConfig = config => Object . assign ( configuration , config )
28
+ export const setConfig = config => setConfiguration ( config )
You can’t perform that action at this time.
0 commit comments