Skip to content

Commit

Permalink
update to xo 0.37
Browse files Browse the repository at this point in the history
  • Loading branch information
piercus committed Feb 6, 2021
1 parent 7ed3c6e commit 024fafe
Showing 7 changed files with 1,209 additions and 813 deletions.
4 changes: 3 additions & 1 deletion demo/src/main.js
Original file line number Diff line number Diff line change
@@ -16,7 +16,9 @@ const delay = 200;
let promise = Promise.resolve();
let previousCorrected = null;

const delayPromise = delay => new Promise(resolve => setTimeout(resolve, delay));
const delayPromise = delay => new Promise(resolve => {
setTimeout(resolve, delay);
});

module.exports = {
run() {
12 changes: 4 additions & 8 deletions lib/setup/set-dimensions.js
Original file line number Diff line number Diff line change
@@ -12,16 +12,12 @@ module.exports = function ({observation, dynamic}) {
const dynamicDimension = dynamic.dimension;
const observationDimension = observation.dimension;

if (dynamicDimension && observationDimension && Array.isArray(stateProjection)) {
if (dynamicDimension !== stateProjection[0].length || observationDimension !== stateProjection.length) {
throw (new TypeError('stateProjection dimensions not matching with observation and dynamic dimensions'));
}
if (dynamicDimension && observationDimension && Array.isArray(stateProjection) && (dynamicDimension !== stateProjection[0].length || observationDimension !== stateProjection.length)) {
throw (new TypeError('stateProjection dimensions not matching with observation and dynamic dimensions'));
}

if (dynamicDimension && Array.isArray(transition)) {
if (dynamicDimension !== transition.length) {
throw (new TypeError('transition dimension not matching with dynamic dimension'));
}
if (dynamicDimension && Array.isArray(transition) && dynamicDimension !== transition.length) {
throw (new TypeError('transition dimension not matching with dynamic dimension'));
}

if (Array.isArray(stateProjection)) {
Loading

0 comments on commit 024fafe

Please sign in to comment.