|
|
|
|
122
|
const { height: oldHeight, width: oldWidth, source: prevSource, script: prevScript } = state;
|
122
|
const { height: oldHeight, width: oldWidth, source: prevSource, script: prevScript } = state;
|
123
|
const { style } = props;
|
123
|
const { style } = props;
|
124
|
const { source, script } = getUpdatedState(props, getBaseScript);
|
124
|
const { source, script } = getUpdatedState(props, getBaseScript);
|
125
|
- const height = style && style.height ? style.height : null;
|
|
|
126
|
- const width = style && style.width ? style.width : null;
|
|
|
|
|
125
|
+ const height = style ? style.height : null;
|
|
|
126
|
+ const width = style ? style.width : null;
|
127
|
if (source.html !== prevSource.html || source.uri !== prevSource.uri || script !== prevScript) {
|
127
|
if (source.html !== prevSource.html || source.uri !== prevSource.uri || script !== prevScript) {
|
128
|
return {
|
128
|
return {
|
129
|
source,
|
129
|
source,
|
|
|
|
|
133
|
}
|
133
|
}
|
134
|
if (isSizeChanged(height, oldHeight, width, oldWidth)) {
|
134
|
if (isSizeChanged(height, oldHeight, width, oldWidth)) {
|
135
|
return {
|
135
|
return {
|
136
|
- height: height ? height : oldHeight,
|
|
|
137
|
- width: width ? width : oldWidth,
|
|
|
|
|
136
|
+ height: height || oldHeight,
|
|
|
137
|
+ width: width || oldWidth,
|
138
|
isSizeChanged: true
|
138
|
isSizeChanged: true
|
139
|
};
|
139
|
};
|
140
|
}
|
140
|
}
|