mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +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.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@95972 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
451aa6c536
commit
08e9a35242
@ -41,7 +41,14 @@ Upload.prototype = {
|
||||
if(typeof params.button_width != 'undefined') this.buttonWidth = params.button_width;
|
||||
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