react-transporter
Advanced tools
Comparing version 0.5.10 to 0.5.11
@@ -409,2 +409,3 @@ 'use strict'; | ||
if (config.selectors || config.actions) { | ||
// TODO: cache function call to enhanceWithConnect in production | ||
var EnhancedComponent = (0, _enhanceWithConnect2.default)(Component); | ||
@@ -411,0 +412,0 @@ |
@@ -95,2 +95,4 @@ 'use strict'; | ||
var name = (0, _getName2.default)(rawName); | ||
var isStringName = typeof rawName === 'string' || rawName instanceof String; | ||
var resultName = isStringName ? rawName : rawName[0]; | ||
@@ -100,3 +102,3 @@ if (this.isManyLink) { | ||
if (_this.data[key]) { | ||
_this.data[key][name] = (0, _getRelationData2.default)( | ||
_this.data[key][resultName] = (0, _getRelationData2.default)( | ||
// eslint-disable-next-line no-underscore-dangle | ||
@@ -107,3 +109,3 @@ _this.data[key].__typename, _this.data[key].id, name, _this.state, constraints, shallow); | ||
} else if (this.data) { | ||
this.data[name] = (0, _getRelationData2.default)( | ||
this.data[resultName] = (0, _getRelationData2.default)( | ||
// eslint-disable-next-line no-underscore-dangle | ||
@@ -110,0 +112,0 @@ this.data.__typename, this.data.id, name, this.state, constraints, shallow); |
@@ -6,3 +6,22 @@ 'use strict'; | ||
}); | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
exports.default = getName; | ||
var stringifyObject = function stringifyObject(obj) { | ||
var keys = Object.keys(obj); | ||
keys.sort(); | ||
var parts = keys.map(function (key) { | ||
var isObject = obj[key] !== null && _typeof(obj[key]) === 'object'; | ||
var value = isObject ? stringifyObject(obj[key]) : JSON.stringify(obj[key]); | ||
return '"' + key + '":' + value; | ||
}); | ||
return '{' + parts.join(',') + '}'; | ||
}; | ||
function getName(name) { | ||
@@ -13,3 +32,3 @@ if (typeof name === 'string' || name instanceof String) { | ||
return name[0] + '(' + JSON.stringify(name[1], Object.keys(name[1]).sort()) + ')'; | ||
return name[0] + '(' + stringifyObject(name[1]) + ')'; | ||
} |
{ | ||
"name": "react-transporter", | ||
"version": "0.5.10", | ||
"version": "0.5.11", | ||
"main": "./lib/index.js", | ||
@@ -5,0 +5,0 @@ "description": "React.js Redux GraphQL client", |
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
98688
2181