From 068ed72df2a9a8dc23ba59d65b67ae673c9d24db Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Sat, 21 Sep 2019 10:19:23 -0400 Subject: [PATCH] add validation to parseResponse in JS --- video_metadata/static/file_listing.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/video_metadata/static/file_listing.js b/video_metadata/static/file_listing.js index 24c810d..20eca89 100644 --- a/video_metadata/static/file_listing.js +++ b/video_metadata/static/file_listing.js @@ -44,6 +44,11 @@ function addContents(node, json) { } function parseResponse(json, node) { + if (node == null) { + logError('parent node cannot be null'); + return; + } + if (json.errors.length > 0) { for (let err of json.errors) logError(err);