diff --git a/src/utils/getStaticAttributeValue.ts b/src/utils/getStaticAttributeValue.ts
index c356d84c35..40ef4a1ec5 100644
--- a/src/utils/getStaticAttributeValue.ts
+++ b/src/utils/getStaticAttributeValue.ts
@@ -2,7 +2,7 @@ import { Node } from '../interfaces';
export default function getStaticAttributeValue(node: Node, name: string) {
const attribute = node.attributes.find(
- (attr: Node) => attr.name.toLowerCase() === name
+ (attr: Node) => attr.type === 'Attribute' && attr.name.toLowerCase() === name
);
if (!attribute) return null;
diff --git a/test/runtime/samples/spread-element-input/_config.js b/test/runtime/samples/spread-element-input/_config.js
new file mode 100644
index 0000000000..26f6d9cec2
--- /dev/null
+++ b/test/runtime/samples/spread-element-input/_config.js
@@ -0,0 +1,9 @@
+export default {
+ data: {
+ props: {
+ 'data-foo': 'bar'
+ }
+ },
+
+ html: ``
+};
diff --git a/test/runtime/samples/spread-element-input/main.html b/test/runtime/samples/spread-element-input/main.html
new file mode 100644
index 0000000000..736444749b
--- /dev/null
+++ b/test/runtime/samples/spread-element-input/main.html
@@ -0,0 +1 @@
+
\ No newline at end of file