8000 fix(minor): add optional chaining for this.$input by maharshivpatel · Pull Request #24323 · frappe/frappe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(minor): add optional chaining for this.$input #24323

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

Merged

Conversation

maharshivpatel
Copy link
Contributor
  • before trying to toggleClass on this.$input check if it exists

- before trying to toggleClass on th
8000
is.$input check if it exists
@maharshivpatel maharshivpatel requested review from a team and shariquerik and removed request for a team January 14, 2024 14:43
Copy link
codecov bot commented Jan 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a42909c) 62.11% compared to head (afb95c4) 62.06%.
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #24323      +/-   ##
===========================================
- Coverage    62.11%   62.06%   -0.05%     
===========================================
  Files          786      786              
  Lines        74944    74944              
  Branches      6420     6420              
===========================================
- Hits         46549    46512      -37     
- Misses       24742    24762      +20     
- Partials      3653     3670      +17     
Flag Coverage Δ
server-ui 27.11% <ø> (+0.01%) ⬆️
ui-tests 51.10% <100.00%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@@ -217,7 +217,7 @@ frappe.ui.form.ControlInput = class ControlInput extends frappe.ui.form.Control
let invalid = !!this.df.invalid;
if (this.grid) {
this.$wrapper.parents(".grid-static-col").toggleClass("invalid", invalid);
this.$input.toggleClass("invalid", invalid);
this.$input?.toggleClass("invalid", invalid);
Copy link
Member

Choose a reason for hiding this comment

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

Umm, why this happens? All inputs are supposed to have inputs?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 backport version-15-hotfix Backport the PR to v15
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0