diff --git a/src/appdb.js b/src/appdb.js index 444a483d5..5401e25a9 100644 --- a/src/appdb.js +++ b/src/appdb.js @@ -97,7 +97,7 @@ function postProcess(result) { delete result.restoreConfigJson; assert(result.tagsJson === null || typeof result.tagsJson === 'string'); - result.tags = safe.JSON.parse(result.tagsJson) || []; + result.tags = safe.JSON.parse(result.tagsJson) || null; delete result.tagsJson; assert(result.hostPorts === null || typeof result.hostPorts === 'string'); diff --git a/src/apps.js b/src/apps.js index 6fefaf61f..f96527aef 100644 --- a/src/apps.js +++ b/src/apps.js @@ -299,7 +299,7 @@ function validateLabel(label) { } function validateTags(tags) { - assert(Array.isArray(tags), 'tags must be an array'); + if (tags === null) return null; if (tags.length > 64) return new AppsError(AppsError.BAD_FIELD, 'Can only set up to 64 tags');