mirror of
https://github.com/spacebarchat/spacebarchat.git
synced 2024-11-08 19:52:36 +01:00
🐛 fix notion duplicate insert
This commit is contained in:
parent
c7701d2cba
commit
82d007b0a6
@ -208,7 +208,8 @@ class GithubNotionSync {
|
||||
}
|
||||
} else {
|
||||
console.log("adding new one");
|
||||
this.allNotionPages.push(await this.notion.pages.create(options));
|
||||
const index = this.allNotionPages.push(options) - 1; // directly insert it as they might be inserted twice if the webhook is triggered in very short amount of time
|
||||
this.allNotionPages[index] = await this.notion.pages.create(options);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(issue);
|
||||
|
Loading…
Reference in New Issue
Block a user