Skip to content

Commit

Permalink
fix: More resistance againts empty json blocks or properties
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeluxe committed Feb 7, 2024
1 parent 4ed26ad commit 5e9d2d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commands/cleanup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export default class extends Command {
const paths: Array<string> = []
for (let item of output) {
// skip if first asset has no path
if(item.assets[0].hasOwnProperty('path')) {
if(item.assets.length > 0 && item.assets[0].path) {
let trimmedPath: string = item.assets[0].path.split("/").slice(0, pathDepth).join("/")
components.push(new Component()
.withDate(item.assets[0].lastModified)
Expand Down

0 comments on commit 5e9d2d6

Please sign in to comment.