Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor duplicate code in src/messaging/data.js #92

Open
wants to merge 11 commits into
base: f24
Choose a base branch
from

Conversation

jdufitum
Copy link

@jdufitum jdufitum commented Sep 5, 2024

This pull request resolves issue #8
Resolves #8

This pull request refactors the code in src/messaging/data.js by removing duplicate code blocks between lines 83 and 89. The code has been optimized to improve maintainability and prevent redundancy. Additionally, adjustments were made to ensure functionality remains consistent after the refactor.

  • Removed redundant code between lines 83 and 89.
  • Optimized logic for handling messaging data.
  • Ensured all tests pass with the updated code structure.

This pull request resolves issue #8 .

Consolidated identical code blocks in the conditional structure of src/messaging/data.js to improve maintainability. The repeated assignment of message.newSet = true was refactored into a single condition to reduce redundancy and enhance code clarity.
…e. I also added the original contents of the file widgets.js
…84 to line 91 of the file data.js in the src/messaging
…duplicate code block from line 84 to line 91 of the file data.js in the src/messaging
…added comments and tested the new code chunck
- Adjusted indentation levels to match the expected number of tabs.
- Ensured consistent formatting for better readability and maintainability.

Affected lines:
- Line 84: Increased indentation from 3 tabs to 4 tabs.
- Line 89: Increased indentation from 4 tabs to 5 tabs.
- Line 92: Increased indentation from 5 tabs to 6 tabs.
- Line 93: Increased indentation from 4 tabs to 5 tabs.
- Line 94: Increased indentation from 3 tabs to 4 tabs.
- Line 95: Increased indentation from 3 tabs to 4 tabs.
Copy link

sonarcloud bot commented Sep 5, 2024

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.

Refactor code in src/messaging/data.js to remove duplicated code blocks.
1 participant