Skip to content
This repository was archived by the owner on Sep 28, 2023. It is now read-only.

Commit 016f536

Browse files
committed
Check if feature exists before calling vmap in getFeatureVariableType
1 parent afd75a3 commit 016f536

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

debugdialog.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,11 @@
173173
}
174174

175175
function getFeatureVariableType(featureKey, variableKey) {
176-
var vmap = optimizelyClientInstance.getOptimizelyConfig().featuresMap[featureKey].variablesMap;
176+
let feature = optimizelyClientInstance.getOptimizelyConfig().featuresMap[featureKey];
177+
if (feature === undefined) {
178+
return null;
179+
}
180+
var vmap = feature.variablesMap
177181
return vmap[variableKey].type
178182
}
179183

0 commit comments

Comments
 (0)