Skip to content

Commit

Permalink
fix: Check if the enabledElement.options exists before checking .colo…
Browse files Browse the repository at this point in the history
…rmap (#412)
  • Loading branch information
mateusfreira authored and dannyrb committed Oct 3, 2019
1 parent 2bd2e4a commit a0071e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rendering/renderPseudoColorImage.js
Expand Up @@ -26,7 +26,7 @@ function getRenderCanvas (enabledElement, image, invalidated) {

let colormap = enabledElement.viewport.colormap || enabledElement.options.colormap;

if (enabledElement.options.colormap) {
if (enabledElement.options && enabledElement.options.colormap) {
console.warn('enabledElement.options.colormap is deprecated. Use enabledElement.viewport.colormap instead');
}
if (colormap && (typeof colormap === 'string')) {
Expand Down

0 comments on commit a0071e4

Please sign in to comment.