last day (15 days later) » 

8:47 PM
Hey. are you there?
 
9:18 PM
@GuillermoGutiérrez hey. I can provide working projects's link also.
if you're interested to help
 
ok
length is a property of every javascript object
 
here is link goo.gl/DCQaNH
please upload any file
1-2 kb first
then open dev console on both firefox and chrome
you'll see console.log result of object
 
it says: TypeError: userHistory is undefined
 
wait a minute.
please recheck
 
9:22 PM
hard reset page
 
it display an Array object with 0 items
 
are you checking on chrome?
 
ok, I missed that, I was on firefox, let me see...
 
joxi.ru/ILTaU4wyTJDAODCfQZU look at this result
you see what I'm talking about?
 
That's userHistory content?
 
9:27 PM
yeah
 
it's userHistory an array?
 
user history consiste of hash->array of files
consists of
it's object
json
 
ok
just tested on chrome, and gives me the same result of firefox
an empty array
 
i can give you clean js also, if you can't read minified one
have you uploaded anything to website?
 
a small picture
 
9:29 PM
you see history button with "1" badge?
on firefox you must see 1 but on chrome it show 2 and you can see difference between console.log results of same item on both browsers
 
no, it is at zero
in firefox was at one when I uploaded one file
but a few minutes ago
will try again
 
yes because on ff it works well
just clear cache of browser
and re upload
you'll see difference between two console logs
goo.gl/Mh9qbN you can see here problematic code. look at nearby console.log(userHistory);
Anyone else? @NicolasR @Tyblitz ?? have you taken a look?
 
can you test it on chrome using incognito window
?
 
yeah tried
wait a min. I'll provide you with screenshot
on incognito
 
weird, it counted the first file I have uploaded, but on the second the counter turned to zero again
 
9:38 PM
i'm taking a look
wait a min please
 
the problem seems to be when you save each file's info on the local storage
it seems that the file info is not added to the array
because the refreshHistory function seem to be working ok
it gets the history array from local storage
 
yeah I know. I'm checking push part now
 
and updates the badge on the history button
 
Very strange
localstorage doesn't keep array
on chrome
@GuillermoGutiérrez there?
can you take a look, where can userhistory be setted empty?
 
9:56 PM
sorry, was out for a moment
where do you set the localhistory?
 
localstorage is set on ajax request
whiles files successfuly uploaded
 
ok, let me check that
 
please hard refresh
and check
@GuillermoGutiérrez have you found anything?
 
no, nothing so far
this seems to be
localStorage["history"] = JSON.stringify(userHistory)
but when you get the data
 
i know
I changed
there was mistake
 
10:08 PM
the key using in localStorage is "userHistory"
 
I changed same thing happens
 
ok, I will refresh the page and see
 
Look
When I console.log this JSON.stringify(userHistory);
it returns []
when I console.log userHistory
it returns array
with filled vaues
I think it's related with json thing
OHHH
i fixed
omg
at the begining I defined userHistory = []. but It must be userHistory={}
 
ahhh, congrats
 
thank you man
 
10:15 PM
hahahaha, I have never think of it
you're welcome
 

last day (15 days later) »