@hig/theme-context
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -16,2 +16,6 @@ import createReactContext from 'create-react-context'; | ||
function hasRoleFormat(prop) { | ||
return prop.search(/\./) > 0; | ||
} | ||
function resolvedRolesProxy(roles, theme) { | ||
@@ -22,3 +26,3 @@ if ((typeof roles === "undefined" ? "undefined" : _typeof(roles)) !== "object") return roles; | ||
get: function get(obj, prop) { | ||
if (!isPresent(obj, prop)) { | ||
if (hasRoleFormat(prop) && !isPresent(obj, prop)) { | ||
/* eslint-disable-next-line no-console */ | ||
@@ -25,0 +29,0 @@ console.error("Role " + prop.toString() + " does not exist"); |
@@ -23,2 +23,6 @@ 'use strict'; | ||
function hasRoleFormat(prop) { | ||
return prop.search(/\./) > 0; | ||
} | ||
function resolvedRolesProxy(roles, theme) { | ||
@@ -29,3 +33,3 @@ if ((typeof roles === "undefined" ? "undefined" : _typeof(roles)) !== "object") return roles; | ||
get: function get(obj, prop) { | ||
if (!isPresent(obj, prop)) { | ||
if (hasRoleFormat(prop) && !isPresent(obj, prop)) { | ||
/* eslint-disable-next-line no-console */ | ||
@@ -32,0 +36,0 @@ console.error("Role " + prop.toString() + " does not exist"); |
@@ -0,1 +1,8 @@ | ||
# [@hig/theme-context-v2.1.2](https://github.com/Autodesk/hig/compare/@hig/theme-context@2.1.1...@hig/theme-context@2.1.2) (2019-03-08) | ||
### Bug Fixes | ||
* throws role missing warning when getting roles only ([2c4bbf6](https://github.com/Autodesk/hig/commit/2c4bbf6)) | ||
# [@hig/theme-context-v2.1.1](https://github.com/Autodesk/hig/compare/@hig/theme-context@2.1.0...@hig/theme-context@2.1.1) (2019-03-05) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@hig/theme-context", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "ThemeContext components to ease adoption of theme data from React components", | ||
@@ -21,3 +21,3 @@ "author": "Autodesk Inc.", | ||
"dependencies": { | ||
"@hig/theme-data": "^2.3.1", | ||
"@hig/theme-data": "^2.3.2", | ||
"create-react-context": "^0.2.3", | ||
@@ -24,0 +24,0 @@ "prop-types": "^15.6.1" |
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
17189
200
Updated@hig/theme-data@^2.3.2