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

bugfix: fixed bug in image-picker, Uncaught TypeError: Cannot set pro… #2302

Merged
merged 1 commit into from Mar 12, 2018

Conversation

dqmmpb
Copy link
Contributor

@dqmmpb dqmmpb commented Jan 30, 2018

Fixed a bug in image-picker, Uncaught TypeError: Cannot set property 'value' of null.

When the selector at the header of a new row, then delete a pic, and readd a new pic, the bug appear. So, do not delete the fileselectorInput, if the input is null.

First of all, thank you for your contribution! :-)

Please makes sure that these checkboxes are checked before submitting your PR, thank you!

  • Make sure that you follow antd's code convention.
  • Run npm run lint and fix those errors before submitting in order to keep consistent code style.
  • Rebase before creating a PR to keep commit history clear.
  • Add some descriptions and refer relative issues for you PR.

Extra checklist:

if isBugFix :

  • Make sure that you add at least one unit test for the bug which you had fixed.

elif isNewFeature :

  • Update API docs for the component.
  • Update/Add demo to demonstrate new feature.
  • Update TypeScript definition for the component.
  • Add unit tests for the feature.

This change is Reviewable

@codecov
Copy link

codecov bot commented Jan 30, 2018

Codecov Report

Merging #2302 into master will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2302      +/-   ##
==========================================
- Coverage   57.63%   57.61%   -0.03%     
==========================================
  Files         260      260              
  Lines        4464     4466       +2     
  Branches     1178     1179       +1     
==========================================
  Hits         2573     2573              
- Misses       1890     1892       +2     
  Partials        1        1
Flag Coverage Δ
#rn 60.78% <ø> (ø) ⬆️
#web 54.91% <ø> (-0.05%) ⬇️
Impacted Files Coverage Δ
components/image-picker/index.tsx 33.02% <ø> (-0.62%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e15eaeb...8217328. Read the comment docs.

BANG88 added a commit to BANG88/ant-design-mobile that referenced this pull request Feb 7, 2018
BANG88 added a commit to BANG88/ant-design-mobile that referenced this pull request Mar 10, 2018
@paranoidjk paranoidjk merged commit 3eac444 into ant-design:master Mar 12, 2018
@paranoidjk paranoidjk mentioned this pull request Mar 12, 2018
9 tasks
BANG88 added a commit to BANG88/ant-design-mobile that referenced this pull request Mar 13, 2018
* master:
  fix(Carousel): ant-design#2369
  chore: delete upgrade tip
  fix: Fix all failed test (ant-design#2337)
  fix: modal.alert content align=center (ant-design#2347)
  bugfix: fixed bug in image-picker, Uncaught TypeError: Cannot set property 'value' of null (ant-design#2302)

# Conflicts:
#	components/_util/upgradeTip.tsx
#	components/image-picker/index.tsx
BANG88 added a commit to BANG88/ant-design-mobile that referenced this pull request Mar 15, 2018
* master:
  test: update snapshot
  ci: upgrade to nodejs 8
  fix(Carousel): ant-design#2369
  chore: delete upgrade tip
  fix: Fix all failed test (ant-design#2337)
  fix: modal.alert content align=center (ant-design#2347)
  bugfix: fixed bug in image-picker, Uncaught TypeError: Cannot set property 'value' of null (ant-design#2302)

# Conflicts:
#	components/_util/upgradeTip.tsx
#	components/image-picker/index.tsx
paranoidjk pushed a commit that referenced this pull request Mar 16, 2018
* refactor(util): noImplicitAny

* refactor(accordion): type definitions improvements

* refactor(action-sheet): add missing type definitions

* chore: configuration

* refactor(activity-indicator): type definitions

* chore: configuration

* refactor(badge): type definitions

* refactor(button): type definitions

* refactor(calendar): type definitions

* refactor(card): type definitions

* refactor(carousel): add type definitions and refactor native part

* refactor(checkbox): type definitions

* refactor(list): type definitions

* refactor(date-picker): type definitions

* refactor(date-picker-view): type definitions

* refactor(drawer): type definitions

* refactor(flex): type definitions

* refactor(grid): type definitions

* refactor(icon): type definitions

* refactor(image-picker): type definitions

* refactor(input-item): type definitions and code refactor

* refactor(locale-provider): type definitions

* refactor(menu): type definitions

* refactor(modal): type definitions

* refactor(nav-bar): type definitions

* refactor(notice-bar): type definitions

* refactor(pagination): type definitions

* refactor(picker): type definitions

* refactor(picker-view): type definitions

* refactor(popover): type definitions

* refactor(progress): type definitions

* refactor(radio): type definitions

* refactor(range): type definitions

* refactor(result): type definitions

* refactor(search-bar): type definitions

* refactor(segmented-control): type definitions

* refactor(slider): type definitions

* refactor(stepper): type definitions

* refactor(steps): type definitions

* refactor(swipe-action): type definitions

* refactor(switch): type definitions

* refactor(tab-bar): type definitions

* refactor(tabs): type definitions

* refactor(tag): type definitions

* refactor(view|text): type definitions

* refactor(textarea-item): type definitions

* refactor(toast): type definitions

* refactor(white-space): type definitions

* refactor(wing-blank): type definitions

* refactor(list-view): type definitions

* refactor(demo): any

* chore(style): use ant-tools tslint configurations

* test: update snapshots

* chore: remove unnecessary configurations and deps

* chore: tslint

* chore: add setup file

* fix: #2302

* test: update snap

* chore: update deps and  fix tests

* chore: try to let jest faster

* refactor(Icon): extends from SVG Props
lixiaoyang1992 pushed a commit to lixiaoyang1992/ant-design-mobile that referenced this pull request Apr 26, 2018
lixiaoyang1992 pushed a commit to lixiaoyang1992/ant-design-mobile that referenced this pull request Apr 26, 2018
* refactor(util): noImplicitAny

* refactor(accordion): type definitions improvements

* refactor(action-sheet): add missing type definitions

* chore: configuration

* refactor(activity-indicator): type definitions

* chore: configuration

* refactor(badge): type definitions

* refactor(button): type definitions

* refactor(calendar): type definitions

* refactor(card): type definitions

* refactor(carousel): add type definitions and refactor native part

* refactor(checkbox): type definitions

* refactor(list): type definitions

* refactor(date-picker): type definitions

* refactor(date-picker-view): type definitions

* refactor(drawer): type definitions

* refactor(flex): type definitions

* refactor(grid): type definitions

* refactor(icon): type definitions

* refactor(image-picker): type definitions

* refactor(input-item): type definitions and code refactor

* refactor(locale-provider): type definitions

* refactor(menu): type definitions

* refactor(modal): type definitions

* refactor(nav-bar): type definitions

* refactor(notice-bar): type definitions

* refactor(pagination): type definitions

* refactor(picker): type definitions

* refactor(picker-view): type definitions

* refactor(popover): type definitions

* refactor(progress): type definitions

* refactor(radio): type definitions

* refactor(range): type definitions

* refactor(result): type definitions

* refactor(search-bar): type definitions

* refactor(segmented-control): type definitions

* refactor(slider): type definitions

* refactor(stepper): type definitions

* refactor(steps): type definitions

* refactor(swipe-action): type definitions

* refactor(switch): type definitions

* refactor(tab-bar): type definitions

* refactor(tabs): type definitions

* refactor(tag): type definitions

* refactor(view|text): type definitions

* refactor(textarea-item): type definitions

* refactor(toast): type definitions

* refactor(white-space): type definitions

* refactor(wing-blank): type definitions

* refactor(list-view): type definitions

* refactor(demo): any

* chore(style): use ant-tools tslint configurations

* test: update snapshots

* chore: remove unnecessary configurations and deps

* chore: tslint

* chore: add setup file

* fix: ant-design#2302

* test: update snap

* chore: update deps and  fix tests

* chore: try to let jest faster

* refactor(Icon): extends from SVG Props
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.

None yet

2 participants