mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX: when the JS files are combined, swfupload.js gets included in pages where there are no placeholder elements available, failing with exception and killing the javascript for the page. Now the exception is intercepted and ignored. (from r95972)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102467 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8fb9fac99e
commit
ea5d386c68
@ -41,7 +41,14 @@ Upload.prototype = {
|
|||||||
if(typeof params.button_width != 'undefined') this.buttonWidth = params.button_width;
|
if(typeof params.button_width != 'undefined') this.buttonWidth = params.button_width;
|
||||||
if(typeof params.button_height != 'undefined') this.buttonHeight = params.button_height;
|
if(typeof params.button_height != 'undefined') this.buttonHeight = params.button_height;
|
||||||
|
|
||||||
this.onLoad();
|
try {
|
||||||
|
this.onLoad();
|
||||||
|
} catch (ex) {
|
||||||
|
// suppress the exception in case swfupload.js is loaded in a context that has no
|
||||||
|
// placeholder elements
|
||||||
|
if ( ex.indexOf('Could not find the placeholder element')==-1 )
|
||||||
|
throw ex;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user