From 28e3170f945b7f750b7f9e33b4fc333895938968 Mon Sep 17 00:00:00 2001 From: metaobjects Date: Sun, 6 Sep 2020 20:50:22 +0800 Subject: [PATCH] Add empty ID warning to change listing Warns for entities without ID attributes to remove that small gotcha --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 2d8be76..7682055 100644 --- a/index.js +++ b/index.js @@ -52,6 +52,9 @@ function prettyPrintChanges (changes) { } else { output += ` ${component}: ${JSON.stringify(changes[id][component])}\n`; } + if( id === null || id === '') { + output += `Warning: This entity does not have a defined ID and will not be updated!\n`; + } }); output += '\n'; });