fix: prevents console log from getting mutated
Description
All logs are stored in an array and processed at once. If a data is logged twice in a function and the data is manipulated in the steps between them, then logs get updated as well. This PR clones the object that should be logged to prevent mutation to it.
Fixes #17746
Type of change
- Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
- Manual
- Cypress
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| appsmith | ✅ Ready (Inspect) | Visit Preview | Oct 25, 2022 at 8:23AM (UTC) |
/ok-to-test sha=a907ef6
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3288433635.
Workflow: Appsmith External Integration Test Workflow.
Commit: a907ef6.
PR: 17756.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17756&runId=3288433635_1
/perf-test ref=rhito/feat-create-run-meta-before-test-starts-compare-lt-st-for-prev-runs
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3288866629.
Workflow: Appsmith External Integration Test Workflow.
Commit: ``.
PR: 17756.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17756&runId=3288866629_1
/perf-test ref=rhito/feat-create-run-meta-before-test-starts-compare-lt-st-for-prev-runs
/perf-test ref=rhito/feat-create-run-meta-before-test-starts-compare-lt-st-for-prev-runs
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3294933883.
Workflow: Appsmith External Integration Test Workflow.
Commit: ``.
PR: 17756.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17756&runId=3294933883_1
/ok-to-test sha=f24c8cb
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3307972175.
Workflow: Appsmith External Integration Test Workflow.
Commit: f24c8cb.
PR: 17756.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17756&runId=3307972175_1
/ok-to-test sha=f24c8cb
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3310258507.
Workflow: Appsmith External Integration Test Workflow.
Commit: f24c8cb.
PR: 17756.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17756&runId=3310258507_1
/ok-to-test sha=2e19c24
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3310875219.
Workflow: Appsmith External Integration Test Workflow.
Commit: 2e19c24.
PR: 17756.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17756&runId=3310875219_1
/ok-to-test sha=fabdf13
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3318595278.
Workflow: Appsmith External Integration Test Workflow.
Commit: fabdf13.
PR: 17756.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17756&runId=3318595278_1
/ok-to-test sha=892e808
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/3319629405.
Workflow: Appsmith External Integration Test Workflow.
Commit: 892e808.
PR: 17756.
Perf tests will be available at https://app.appsmith.com/app/performance-infra-dashboard/pr-details-63465d4789020c7ac296d08d?pr=17756&runId=3319629405_1