Skip to content
This repository has been archived by the owner on Mar 4, 2023. It is now read-only.

Commit

Permalink
fix: Prevent duplicate asset nodes
Browse files Browse the repository at this point in the history
The check for existing asset nodes was being done against the wrong collection.

Fixes #2
  • Loading branch information
CMeeg committed Sep 15, 2019
1 parent a0770bb commit 9452267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/KenticoCloudSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class KenticoCloudSource {

// Only add the asset node if it does not already exist in the collection

const existingNode = collection.getNode(id);
const existingNode = assetCollection.getNode(id);

if (existingNode === null) {
this.logger.log('Creating Gridsome node for asset %o', asset);
Expand Down

0 comments on commit 9452267

Please sign in to comment.