UC-Davis-molecular-computing / scadnano

Web application for designing DNA structures such as DNA origami.
https://scadnano.org
MIT License
23 stars 13 forks source link

fix React unique key bug in Edit menu #985

Open dave-doty opened 2 months ago

dave-doty commented 2 months ago

Refresh the page in scadnano, then click the Edit menu. This error appears:

react-bootstrap.js:7631 Warning: Each child in a list should have a unique "key" prop.

Check the render method of `DropdownButton`. It was passed a child from MenuDropdownRight. See https://reactjs.org/link/warning-keys for more information.
    at span
    at http://localhost:8080/external-libs/react-bootstrap.js:7611:20
    at MenuDropdownRight (http://localhost:8080/packages/react/react.js:275:7)
    at div
    at http://localhost:8080/external-libs/react-bootstrap.js:7248:23
    at div
    at http://localhost:8080/external-libs/react-bootstrap.js:11173:23
    at Dropdown (http://localhost:8080/external-libs/react-bootstrap.js:6875:19)
    at http://localhost:8080/external-libs/react-bootstrap.js:7473:26
    at http://localhost:8080/external-libs/react-bootstrap.js:11837:17
    at nav
    at http://localhost:8080/external-libs/react-bootstrap.js:11714:26
    at Menu (http://localhost:8080/packages/react/react.js:275:7)
    at ConnectFunction (http://localhost:8080/packages/react/react_dom.js:7433:75)
    at Connect(Menu)
    at Provider (http://localhost:8080/packages/react/react_dom.js:7146:20)
    at RecoverableErrorBoundary (http://localhost:8080/packages/react/react.js:275:7)
    at ErrorBoundary (http://localhost:8080/packages/react/react.js:275:7)

This appears like it is unrelated, but it also appears at the same time:

console.js:288 Warning: The tag <text> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.
    at text
    at button
    at http://localhost:8080/external-libs/react-bootstrap.js:3935:23
    at http://localhost:8080/external-libs/react-bootstrap.js:7348:23
    at div
    at Dropdown (http://localhost:8080/external-libs/react-bootstrap.js:6875:19)
    at http://localhost:8080/external-libs/react-bootstrap.js:7473:26
    at http://localhost:8080/external-libs/react-bootstrap.js:7611:20
    at MenuDropdownRight (http://localhost:8080/packages/react/react.js:275:7)
    at div
    at http://localhost:8080/external-libs/react-bootstrap.js:7248:23
    at div
    at http://localhost:8080/external-libs/react-bootstrap.js:11173:23
    at Dropdown (http://localhost:8080/external-libs/react-bootstrap.js:6875:19)
    at http://localhost:8080/external-libs/react-bootstrap.js:7473:26
    at http://localhost:8080/external-libs/react-bootstrap.js:11837:17
    at nav
    at http://localhost:8080/external-libs/react-bootstrap.js:11714:26
    at Menu (http://localhost:8080/packages/react/react.js:275:7)
    at ConnectFunction (http://localhost:8080/packages/react/react_dom.js:7433:75)
    at Connect(Menu)
    at Provider (http://localhost:8080/packages/react/react_dom.js:7146:20)
    at RecoverableErrorBoundary (http://localhost:8080/packages/react/react.js:275:7)
    at ErrorBoundary (http://localhost:8080/packages/react/react.js:275:7)