@sanity/default-layout
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -15,7 +15,13 @@ 'use strict'; | ||
exports.default = (0, _router.createRoute)('/some-site/:tool/*', function (params) { | ||
var tool = _tool2.default.find(function (tool) { | ||
return tool.name === params.tool; | ||
exports.default = (0, _router.createRoute)('/:tool/*', function (params) { | ||
var tool = _tool2.default.find(function (curr) { | ||
return curr.name === params.tool; | ||
}); | ||
// @todo implement better handling of errors | ||
if (!tool) { | ||
throw new Error('Tool with name "' + params.tool + '" not found'); | ||
} | ||
return (0, _router.createScope)(tool.name, tool.router); | ||
}); |
{ | ||
"name": "@sanity/default-layout", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "The default layout components for Sanity", | ||
@@ -5,0 +5,0 @@ "main": "lib/default-layout.js", |
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
130323
27
1053