Skip to content

Commit

Permalink
Fixed endless loop in hot module reloading (#1214)
Browse files Browse the repository at this point in the history
## Problem

- Fixes endless loop when touching the `client/storage.js` file

## Details

- The hot module replacement checks the module dependencies
- I'm not 100% sure with the solution but it seems that there is a
dependency cycle `storage/index.js` -> `storage/DASDPage.jsx` ->
`storage/index.js`

## Solution

- Break the dependency cycle by directly loading the files, not via the
`storage/index.js` module

## Testing

- Tested manually, works fine
  • Loading branch information
lslezak committed May 15, 2024
2 parents e3ca84c + 354b05f commit ac03083
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/src/components/storage/DASDPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ import React, { useEffect, useReducer } from "react";

import { _ } from "~/i18n";
import { If, Page } from "~/components/core";
import { DASDFormatProgress, DASDTable } from "~/components/storage";
import DASDFormatProgress from "~/components/storage/DASDFormatProgress";
import DASDTable from "~/components/storage/DASDTable";
import { useCancellablePromise } from "~/utils";
import { useInstallerClient } from "~/context/installer";

Expand Down

0 comments on commit ac03083

Please sign in to comment.