Skip to content

Bundler Improvements#24

Open
martindale wants to merge 11 commits into
masterfrom
feature/bundler
Open

Bundler Improvements#24
martindale wants to merge 11 commits into
masterfrom
feature/bundler

Conversation

@martindale

Copy link
Copy Markdown
Member

Fixes some issues with generating the browser bundle, also adds some new controls for certain document types.

cursor[bot]

This comment was marked as outdated.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: State Variable Reference Error

In the handleSubmit method, the allValid variable is referenced directly instead of this.state.allValid. This causes a ReferenceError because allValid is a component state property and not defined in the local scope.

components/CreateTaskModal.js#L69-L70

if (allValid) {

Fix in CursorFix in Web


Bug: Duplicate Method Definition Causes Callback Issues

The handleInputChange method is defined twice. The second definition, which includes an empty callback function, overrides the first, potentially causing unexpected behavior.

components/CreateTaskModal.js#L41-L51

// Handle input change
handleInputChange = (e, { name, value }) => {
this.setState({ [name]: value });
};
handleInputChange = (e, { name, value }) => {
this.setState({ [name]: value }, () => {
});
};

Fix in CursorFix in Web


Bug: Modal Form Submission Handler Error

The Form in CreateTaskModal.js incorrectly references this.handlePasswordSubmit for its onSubmit handler. The correct method, this.handleSubmit, should be used instead, as handlePasswordSubmit is undefined, leading to a runtime error upon submission.

components/CreateTaskModal.js#L110-L111

<Modal.Content>
<Form onSubmit={this.handlePasswordSubmit}>

Fix in CursorFix in Web


Bug: State Update Fails Due to Typo

Typo in componentDidUpdate: filtereDocuments is used instead of filteredDocuments when updating state, preventing the correct filteredDocuments array from being updated.

components/DocumentHome.js#L76-L77

if (!documents.loading && this.state.searching) {
this.setState({ filtereDocuments: documents.results, searching: false });

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant