Skip to content

Commit 0789352

Browse files
committed
fix: getting vdom prop when vdom is not ready yet
1 parent 5790765 commit 0789352

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default function register(Component, tagName, propNames, options) {
2424
propNames.forEach((name) => {
2525
Object.defineProperty(PreactElement.prototype, name, {
2626
get() {
27-
return this._vdom.props[name];
27+
return this._vdom?.props?.[name];
2828
},
2929
set(v) {
3030
if (this._vdom) {

0 commit comments

Comments
 (0)