1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-31 03:09:44 +02:00

fix(image): support array in Messages.error

This commit is contained in:
Anthony Lapenna 2016-09-07 18:03:55 +12:00
parent c82abae8e5
commit 4eb9a9a0af
2 changed files with 3 additions and 2 deletions

View file

@ -50,8 +50,8 @@ function genericHandler(data) {
// This handler returns the original array on success or a newly created array containing
// only one JSON object with the field message filled with the error message on failure.
function deleteImageHandler(data) {
var response = [];
// A string is returned on failure (Docker < 1.12)
var response = [];
if (!isJSON(data)) {
response.push({message: data});
}