File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/modules/product/src/services Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -902,9 +902,9 @@ export default class ProductModuleService
902902 ...opt ,
903903 values : opt . values ?. map ( ( v ) => {
904904 // Normalize each value into an object and attach rank if available
905- const valueObj = typeof v === "string" ? { value : v } : v
905+ const valueObj = isString ( v ) ? { value : v } : v
906906 const rank =
907- opt . ranks && typeof v === "string"
907+ opt . ranks && isString ( v )
908908 ? opt . ranks [ v ]
909909 : opt . ranks ?. [ valueObj . value ]
910910
@@ -1057,10 +1057,10 @@ export default class ProductModuleService
10571057 if ( opt . values ) {
10581058 // If new values are provided → normalize and apply ranks
10591059 normalizedValues = opt . values . map ( ( v ) => {
1060- const valueObj = typeof v === "string" ? { value : v } : v
1060+ const valueObj = isString ( v ) ? { value : v } : v
10611061
10621062 const rank =
1063- opt . ranks && typeof v === "string"
1063+ opt . ranks && isString ( v )
10641064 ? opt . ranks [ v ]
10651065 : opt . ranks ?. [ valueObj . value ]
10661066
You can’t perform that action at this time.
0 commit comments