preact-render-to-string 6.0.2 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs.js +1 -1
- package/dist/commonjs.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -0
- package/dist/index.module.js +1 -1
- package/dist/index.module.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/jsx.mjs.map +1 -1
- package/dist/jsx.module.js.map +1 -1
- package/dist/jsx.umd.js.map +1 -1
- package/jsx.d.ts +21 -0
- package/package.json +2 -1
- package/src/index.js +8 -2
- package/src/jsx.js +3 -3
- package/src/pretty.js +2 -4
package/src/pretty.js
CHANGED
|
@@ -8,8 +8,8 @@ import {
|
|
|
8
8
|
UNSAFE_NAME,
|
|
9
9
|
XLINK,
|
|
10
10
|
VOID_ELEMENTS
|
|
11
|
-
} from './util';
|
|
12
|
-
import { COMMIT, DIFF, DIFFED, RENDER, SKIP_EFFECTS } from './constants';
|
|
11
|
+
} from './util.js';
|
|
12
|
+
import { COMMIT, DIFF, DIFFED, RENDER, SKIP_EFFECTS } from './constants.js';
|
|
13
13
|
import { options, Fragment } from 'preact';
|
|
14
14
|
|
|
15
15
|
/** @typedef {import('preact').VNode} VNode */
|
|
@@ -133,7 +133,6 @@ function _renderToStringPretty(
|
|
|
133
133
|
!nodeName.prototype ||
|
|
134
134
|
typeof nodeName.prototype.render !== 'function'
|
|
135
135
|
) {
|
|
136
|
-
|
|
137
136
|
// If a hook invokes setState() to invalidate the component during rendering,
|
|
138
137
|
// re-render it up to 25 times to allow "settling" of memoized states.
|
|
139
138
|
// Note:
|
|
@@ -149,7 +148,6 @@ function _renderToStringPretty(
|
|
|
149
148
|
rendered = nodeName.call(vnode.__c, props, cctx);
|
|
150
149
|
}
|
|
151
150
|
} else {
|
|
152
|
-
|
|
153
151
|
// c = new nodeName(props, context);
|
|
154
152
|
c = vnode.__c = new nodeName(props, cctx);
|
|
155
153
|
c.__v = vnode;
|