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

Number total of element is incorrect when there is only one item #30

Closed
FroggDev opened this issue Jan 2, 2020 · 4 comments
Closed

Comments

@FroggDev
Copy link

FroggDev commented Jan 2, 2020

Describe the bug
when there is only 1 element number of total element is true instead of 1

To Reproduce
Given I installe the projet
When I uploaded my first file
Then i can see Selected: 0 of true instead of Selected: 0 of 1
And if I select the item i get Selected: 1 of true instead of Selected: 1 of 1

When If i upload another file
Then the total is correct
When I remove the 2nd file (to have only 1)
Then the bug still appear
When i remove all files
Then the total is correct
When I create a new folder
Then the bug still appear

So i can conclued bug exist when there is only 1 element.

Expected behavior
to have Selected: ${x} of 1 when there is only one element

Screenshots
https://upload.frogg.fr/?r=/download&path=L2J1Zy5wbmc%3D

Environment

  • FileGator Version 7.14
  • Server: Apache 2.4 on Debian Linux
  • PHP Version 7.2
  • Browser Opera/Chrome/IE

Additional context
It seem to be a data type trouble 1 is sent as bool 1 = true instead of int 1 = 1
Can be seen there https://upload.frogg.fr/

@alcalbg
Copy link
Member

alcalbg commented Jan 3, 2020

Thanks for reporting this bug, I'll look into this

@alcalbg
Copy link
Member

alcalbg commented Jan 3, 2020

It seems the problem is with Lodash lodash/lodash#2058

alcalbg added a commit that referenced this issue Jan 3, 2020
@alcalbg
Copy link
Member

alcalbg commented Jan 3, 2020

Should be ok now

@alcalbg alcalbg closed this as completed Jan 3, 2020
@FroggDev
Copy link
Author

FroggDev commented Jan 3, 2020

Thanks really fast response and action !

vagra pushed a commit to vagra/filegator that referenced this issue Nov 2, 2020
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

No branches or pull requests

2 participants