fix(core-flows): shipping options for cart (#9343)

FIXES: CC-536

Co-authored-by: Frane Polić <16856471+fPolic@users.noreply.github.com>
This commit is contained in:
Carlos R. L. Rodrigues
2024-09-27 12:32:32 +00:00
committed by GitHub
co-authored by Frane Polić
parent 74b3385a65
commit 19bc8d7f61
8 changed files with 136 additions and 106 deletions
@@ -1,9 +1,9 @@
import {
MedusaError,
RuleOperator,
isObject,
isString,
MedusaError,
pickValueFromObject,
RuleOperator,
} from "@medusajs/framework/utils"
/**
@@ -81,6 +81,7 @@ export function isContextValid(
const predicate = (rule) => {
const { attribute, operator, value } = rule
const contextValue = pickValueFromObject(attribute, context)
return operatorsPredicate[operator](
contextValue,
value as string & string[]