Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cuddly-mails-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@opennextjs/cloudflare": patch
---

fix(tagCache): gracefully handle empty tag list
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export class D1NextModeTagCache implements NextModeTagCache {

async writeTags(tags: string[]): Promise<void> {
const { isDisabled, db } = this.getConfig();
if (isDisabled) return Promise.resolve();
// TODO: Remove `tags.length === 0` when https://github.com/opennextjs/opennextjs-aws/pull/828 is used
if (isDisabled || tags.length === 0) return Promise.resolve();
const result = await db.batch(
tags.map((tag) =>
db
Expand Down