@rotorsoft/act-diagram 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli/act.js CHANGED
@@ -525,7 +525,7 @@ function build_model(result, files, expected_slices) {
525
525
  }
526
526
  for (const a2 of raw_acts) {
527
527
  for (const st of a2.states ?? []) {
528
- if (!st || st._tag !== "State" || state_by_ref.has(st)) continue;
528
+ if (st?._tag !== "State" || state_by_ref.has(st)) continue;
529
529
  try {
530
530
  state_by_ref.set(st, build_state(model, st));
531
531
  } catch (e) {
@@ -1869,7 +1869,7 @@ async function load_project(root_dir, opts = {}) {
1869
1869
  }
1870
1870
  };
1871
1871
  const root_stat = await stat(root_dir).catch(() => null);
1872
- if (!root_stat || !root_stat.isDirectory()) {
1872
+ if (!root_stat?.isDirectory()) {
1873
1873
  return { files, truncated };
1874
1874
  }
1875
1875
  await visit(root_dir.replace(/\\/g, "/"), "");