@radix-ui/react-context
Advanced tools
Comparing version 1.1.1-rc.4 to 1.1.1-rc.5
@@ -65,3 +65,3 @@ "use strict"; | ||
const { scope, children, ...context } = props; | ||
const Context = scope?.[scopeName][index] || BaseContext; | ||
const Context = scope?.[scopeName]?.[index] || BaseContext; | ||
const value = React.useMemo(() => context, Object.values(context)); | ||
@@ -72,3 +72,3 @@ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children }); | ||
function useContext2(consumerName, scope) { | ||
const Context = scope?.[scopeName][index] || BaseContext; | ||
const Context = scope?.[scopeName]?.[index] || BaseContext; | ||
const context = React.useContext(Context); | ||
@@ -75,0 +75,0 @@ if (context) return context; |
{ | ||
"name": "@radix-ui/react-context", | ||
"version": "1.1.1-rc.4", | ||
"version": "1.1.1-rc.5", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "exports": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27908