Skip to content

Commit 8d7dc97

Browse files
fix(vue): improvise logic
1 parent cd840c5 commit 8d7dc97

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/vue/src/components/ReactiveBase/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const ReactiveBase = {
3131
credentials: types.string,
3232
headers: types.headers,
3333
queryParams: types.string,
34-
theme: VueTypes.oneOf([VueTypes.object.def({}), false]),
34+
theme: VueTypes.oneOf([VueTypes.bool, VueTypes.object.def({})]),
3535
themePreset: VueTypes.string.def('light'),
3636
type: types.string,
3737
url: types.string,

packages/vue/src/utils/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ export const X_SEARCH_CLIENT = 'ReactiveSearch Vue';
1717

1818
export const composeThemeObject = (ownTheme = {}, userThemeParam = {}) => {
1919
let userTheme = {};
20-
if (userThemeParam) {
21-
userTheme = { ...userThemeParam };
22-
} else {
20+
if (typeof userThemeParam === 'boolean' && userThemeParam === false) {
2321
userTheme = {
2422
typography: {
2523
fontFamily: 'inherit',
@@ -34,6 +32,8 @@ export const composeThemeObject = (ownTheme = {}, userThemeParam = {}) => {
3432
borderColor: 'inherit',
3533
},
3634
};
35+
} else {
36+
userTheme = { ...userThemeParam };
3737
}
3838
return {
3939
typography: {

0 commit comments

Comments
 (0)