heiseonline / shariff

👮 Shariff enables website users to share their favorite content without compromising their privacy.
http://ct.de/-2467514
MIT License
1.4k stars 177 forks source link

jQuery error if backend returns null #25

Closed mrcbnsls closed 9 years ago

mrcbnsls commented 9 years ago

With included PHP backend, the backend returns null if there are no shares for either of the passed services. In this case, I receive the following jQuery error in the console:

TypeError: a is null
...rCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e...

The error points to f=a. I think the expected behavior would be to display "0" for each service instead of returning null.

lbehm commented 9 years ago

The backend only returns null if an error occurred. So I think it's fine if jQuery fails in this case.

Please check your config if you specify the right domain.

mrcbnsls commented 9 years ago

Thanks, my fault.

Update: It was actually a development environment and the URL in shariff.json was just wrong.