a more robust way to pass the content_locale parameter in an ajax call

This commit is contained in:
Didier Lafforgue 2012-02-10 01:46:35 +01:00
parent 1332185d85
commit da8309c4b1
1 changed files with 1 additions and 1 deletions

View File

@ -48,7 +48,7 @@
var formData = new FormData(); var formData = new FormData();
formData.append('xhr', true); // fix a bug with POW which happens to not like empty form formData.append('xhr', true); // fix a bug with POW which happens to not like empty form
if (window.content_locale) if (typeof(window.content_locale) != 'undefined' && window.content_locale != '')
formData.append('content_locale', window.content_locale); formData.append('content_locale', window.content_locale);
var _buildParams = function(prefix, obj, fn) { // code grabbed from jquery var _buildParams = function(prefix, obj, fn) { // code grabbed from jquery