Skip to content

Commit 3cb2e8e

Browse files
fix(vue): handle for pascalcase props (#2191)
* fix(vue): handle for pascalcase props * format: set labeler paths to match any sub-dirs in specified paths * format: remove comment * feat: stricter node engine for vercel deployment * fix: engine for snapshot tests * fix: use vercel preset * fix: vercel serverless function as preset * chore: reset the engine --------- Co-authored-by: Siddharth Kothari <[email protected]> Co-authored-by: Siddharth Kothari <[email protected]>
1 parent 1259c9b commit 3cb2e8e

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

packages/vue/examples/with-ssr/nuxt.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,7 @@ export default defineNuxtConfig({
2222
},
2323
},
2424
},
25+
nitro:{
26+
preset: 'vercel'
27+
}
2528
});

packages/vue/src/utils/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ const {
1212
// import { storeKey } from '@appbaseio/reactivecore';
1313

1414
export const connect = (...args) => connectToStore(...args);
15-
// connectToStore(...args, null, {
16-
// storeKey,
17-
// });
1815

1916
export const X_SEARCH_CLIENT = 'ReactiveSearch Vue';
2017

@@ -123,12 +120,15 @@ export const hasQuerySuggestionsRenderer = (_ref = {}) => {
123120
* @returns {string}
124121
*/
125122
export const getCamelCase = (str = '') => {
123+
const propsWhichRequirePascalCase = ['u-r-l-params']
126124
const arr = str.split('-');
127125
const capital = arr.map((item, index) =>
128126
index ? item.charAt(0).toUpperCase() + item.slice(1).toLowerCase() : item,
129127
);
130128
// ^-- change here.
131-
const capitalString = capital.join('');
129+
let capitalString = capital.join('');
130+
if(propsWhichRequirePascalCase.includes(str))
131+
capitalString = capitalString[0].toUpperCase() + capitalString.substring(1)
132132
return capitalString || '';
133133
};
134134

0 commit comments

Comments
 (0)