Skip to content

Commit

Permalink
refactor(hdom-canvas): update DiffMode handling
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Dec 22, 2020
1 parent b8f7d5c commit ae8e3cf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/hdom-canvas/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assert, NO_OP } from "@thi.ng/api";
import { isArray, isNotStringAndIterable } from "@thi.ng/checks";
import { diffArray, DiffMode } from "@thi.ng/diff";
import { diffArray } from "@thi.ng/diff";
import { equiv, HDOMImplementation, HDOMOpts, releaseTree } from "@thi.ng/hdom";
import { draw } from "@thi.ng/hiccup-canvas";

Expand Down Expand Up @@ -158,7 +158,7 @@ export const diffTree = (
if (impl && impl !== IMPL) {
return impl.diffTree(opts, parent, prev, curr, child);
}
const delta = diffArray(prev, curr, DiffMode.ONLY_DISTANCE, equiv);
const delta = diffArray(prev, curr, "only-distance", equiv);
if (delta.distance > 0) {
return createTree(opts, parent, curr);
}
Expand Down

0 comments on commit ae8e3cf

Please sign in to comment.