mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-10 23:36:04 +01:00
Fixed unnecessary closing bracket cuasing JS error (fixes #2079)
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
* Flex pages admin better uses available space [#2075](https://github.com/getgrav/grav/issues/2075)
|
||||
1. [](#bugfix)
|
||||
* Regression: Fixed enabling/disabling plugin or theme corrupting configuration
|
||||
* Fixed unnecessary closing bracket cuasing JS error [#2079](https://github.com/getgrav/grav-plugin-admin/issues/2079)
|
||||
|
||||
# v1.10.5
|
||||
## 02/18/2021
|
||||
|
||||
@@ -87,7 +87,7 @@ const ACCEPT_FUNC = function(file, done, settings) {
|
||||
image.src = event.target.result;
|
||||
image.onerror = function() {
|
||||
done(translations.PLUGIN_ADMIN.FILE_ERROR_UPLOAD);
|
||||
});
|
||||
};
|
||||
image.onload = function() {
|
||||
if (resolution.min) {
|
||||
Object.keys(resolution.min).forEach((attr) => {
|
||||
|
||||
7
themes/grav/js/admin.min.js
vendored
7
themes/grav/js/admin.min.js
vendored
@@ -2725,6 +2725,10 @@ var ACCEPT_FUNC = function ACCEPT_FUNC(file, done, settings) {
|
||||
var image = new Image();
|
||||
image.src = event.target.result;
|
||||
|
||||
image.onerror = function () {
|
||||
done(external_GravAdmin_namespaceObject.translations.PLUGIN_ADMIN.FILE_ERROR_UPLOAD);
|
||||
};
|
||||
|
||||
image.onload = function () {
|
||||
var _this = this;
|
||||
|
||||
@@ -2746,6 +2750,8 @@ var ACCEPT_FUNC = function ACCEPT_FUNC(file, done, settings) {
|
||||
}
|
||||
}
|
||||
|
||||
URL.revokeObjectURL(image.src); // release memory
|
||||
|
||||
return error ? done(error) : done();
|
||||
};
|
||||
};
|
||||
@@ -3068,6 +3074,7 @@ var addNode = function addNode(container) {
|
||||
resizeWidth: settings.resizeWidth || null,
|
||||
resizeHeight: settings.resizeHeight || null,
|
||||
resizeQuality: settings.resizeQuality || null,
|
||||
resolution: settings.resolution || null,
|
||||
accept: function accept(file, done) {
|
||||
ACCEPT_FUNC(file, done, settings);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user