diff --git a/src/compile/render-dom/wrappers/Element/Attribute.ts b/src/compile/render-dom/wrappers/Element/Attribute.ts
index 207e706fa4..680c50e992 100644
--- a/src/compile/render-dom/wrappers/Element/Attribute.ts
+++ b/src/compile/render-dom/wrappers/Element/Attribute.ts
@@ -78,7 +78,7 @@ export default class AttributeWrapper {
// DRY it out if that's possible without introducing crazy indirection
if (this.node.chunks.length === 1) {
// single {tag} — may be a non-string
- value = this.node.chunks[0].render();
+ value = this.node.chunks[0].render(block);
} else {
// '{foo} {bar}' — treat as string concatenation
value =
diff --git a/test/runtime/samples/contextual-callback-b/_config.js b/test/runtime/samples/contextual-callback-b/_config.js
new file mode 100644
index 0000000000..f2ed7f5f59
--- /dev/null
+++ b/test/runtime/samples/contextual-callback-b/_config.js
@@ -0,0 +1,12 @@
+export default {
+ html: `
+
+ `
+};
diff --git a/test/runtime/samples/contextual-callback-b/main.svelte b/test/runtime/samples/contextual-callback-b/main.svelte
new file mode 100644
index 0000000000..0010c01fc4
--- /dev/null
+++ b/test/runtime/samples/contextual-callback-b/main.svelte
@@ -0,0 +1,11 @@
+
+
+