Skip to content

Commit

Permalink
fix embedded demo crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoji Chen committed Oct 2, 2019
1 parent 2f7eb47 commit 09a735d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/src/utils/layer-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function propToParam(key, propType, value) {
return {...param, type: 'range', step: param.max === 100 ? 1 : 0.01};
case 'accessor': {
const result = {...param, type: 'function'};
let altValue = propType.value;
const altValue = propType.value;
let altType = typeof altValue;
if (Array.isArray(altValue) && key.endsWith('Color')) {
altType = 'color';
Expand All @@ -50,7 +50,7 @@ export function propToParam(key, propType, value) {
if (/mapping|domain|range/i.test(key)) {
return {...param, type: 'json'};
}
if (propType.async) {
if (propType && propType.async) {
return {...param, type: 'link'};
}
break;
Expand Down

0 comments on commit 09a735d

Please sign in to comment.