Use eval instead of $.script
Fixes https://github.com/nextcloud/server/issues/4067 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
ec6853a2a6
commit
12a019d328
|
@ -368,9 +368,24 @@ var OCP = {},
|
|||
var deferred, path=OC.filePath(app,'js',script+'.js');
|
||||
if(!OC.addScript.loaded[path]) {
|
||||
if(ready) {
|
||||
deferred=$.getScript(path,ready);
|
||||
deferred = jQuery.ajax({
|
||||
url: path,
|
||||
cache: true,
|
||||
success: function (content) {
|
||||
eval(content);
|
||||
eval(ready);
|
||||
},
|
||||
async: false
|
||||
});
|
||||
} else {
|
||||
deferred=$.getScript(path);
|
||||
deferred = jQuery.ajax({
|
||||
url: path,
|
||||
cache: true,
|
||||
success: function (content) {
|
||||
eval(content);
|
||||
},
|
||||
async: false
|
||||
});
|
||||
}
|
||||
OC.addScript.loaded[path] = deferred;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue