Skip to content

Commit

Permalink
Fix guard of publicData
Browse files Browse the repository at this point in the history
  • Loading branch information
hobinjk-ptc committed Sep 24, 2024
1 parent 2be438c commit ce6c7a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ const deleteFrame = async function(objectId, frameId, body, callback) {
return frame.nodes[nodeKey].publicData;
});
var videoPaths = publicDataOnAllNodes.filter(function (publicData) {
if (publicData.hasOwnProperty('data') && typeof publicData.data === 'string') {
if (publicData && publicData.hasOwnProperty('data') && typeof publicData.data === 'string') {
if (publicData.data.indexOf('http') > -1 && publicData.data.indexOf('.mp4') > -1) {
return true;
}
Expand Down

0 comments on commit ce6c7a8

Please sign in to comment.