Skip to content

Commit

Permalink
[#2375] Check upload result object is a plain object
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jul 16, 2012
1 parent 49f6a2a commit 7aec1e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/public/base/javascript/modules/resource-upload-field.js
Expand Up @@ -196,7 +196,8 @@ this.ckan.module('resource-upload-field', function (jQuery, _, i18n) {
// Need to check for a result key. A Google upload can return a 404 if
// the bucket does not exist, this is still treated as a success by the
// form upload plugin.
if (data.result && !data.result.error) {
var result = data.result;
if (result && !(jQuery.isPlainObject(result) && result.error)) {
this.lookupMetadata(data.key, data);
} else {
this._onUploadFail(event, data);
Expand Down

0 comments on commit 7aec1e8

Please sign in to comment.