Skip to content

Commit 1828733

Browse files
committed
fix(Utils): merge view styles
1 parent 4e33d32 commit 1828733

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Utils.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,9 @@ export const isNumeric = (num) => {
136136
* @returns {*[]}
137137
*/
138138
export const mergeViewStyle = (style, defaultStyle) => {
139-
if (Array.isArray(style) && Array.isArray(defaultStyle)) {
139+
if (style == null) {
140+
style = defaultStyle;
141+
} else if (Array.isArray(style) && Array.isArray(defaultStyle)) {
140142
defaultStyle.concat(style);
141143
} else if (Array.isArray(style)) {
142144
style.unshift(defaultStyle);

0 commit comments

Comments
 (0)