Move the block.isMonitored below the block is undefined check

This commit is contained in:
DD Liu 2017-05-11 10:33:46 -04:00
parent 1ea69dd504
commit 7841d44ccf

View file

@ -276,9 +276,9 @@ class Blocks {
// Validate // Validate
if (['field', 'mutation', 'checkbox'].indexOf(args.element) === -1) return; if (['field', 'mutation', 'checkbox'].indexOf(args.element) === -1) return;
const block = this._blocks[args.id]; const block = this._blocks[args.id];
let wasMonitored = block.isMonitored;
if (typeof block === 'undefined') return; if (typeof block === 'undefined') return;
let wasMonitored = block.isMonitored;
switch (args.element) { switch (args.element) {
case 'field': case 'field':
// Update block value // Update block value