Skip to content

Commit

Permalink
fix: grab cornerstone instance when called, not module load (#1078)
Browse files Browse the repository at this point in the history
Reduces the chance that cornerstone has not yet been registered (resulting in `undef`)
  • Loading branch information
dannyrb authored Sep 16, 2019
1 parent 2cdc84f commit a9b2493
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/mixins/segmentation/renderBrushMixin.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import external from './../../externalModules.js';
import store, { getModule } from './../../store/index.js';

const { cornerstone } = external;
const { getters, configuration } = getModule('segmentation');

/**
* Called by the event dispatcher to render the image.
*
* @param {Object} evt - The event.
* @returns {void}
*/
function renderBrush(evt) {
const { cornerstone } = external;
const { getters, configuration } = getModule('segmentation');
const eventData = evt.detail;
const viewport = eventData.viewport;

Expand Down

0 comments on commit a9b2493

Please sign in to comment.