https://github.com/drawveloper/fresh-nested-islands
Repro for nested island bug in deno fresh
https://github.com/drawveloper/fresh-nested-islands
Last synced: about 1 year ago
JSON representation
Repro for nested island bug in deno fresh
- Host: GitHub
- URL: https://github.com/drawveloper/fresh-nested-islands
- Owner: drawveloper
- Created: 2022-04-26T20:52:10.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-26T20:52:55.000Z (about 4 years ago)
- Last Synced: 2025-04-07T12:47:05.039Z (about 1 year ago)
- Language: TypeScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Repro for nested island bug
### Usage
Start the project:
```
deno task dev
```
# The error
The error is exercised by the `islands/Outer.tsx` component.
Apparently, when an Island returns another Island directly, instead of wrapped
in an element such as div, fresh breaks with this in the console:
```
main.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'nextSibling')
at h (main.js:1:99)
at n (main.js:1:659)
at n (main.js:1:690)
at n (main.js:1:717)
at n (main.js:1:717)
at S (main.js:1:722)
at (index):4:1
```
In code:
```
import {a as c, b as a} from "./chunk-UCTKUVK6.js";
function h(e, n) {
n = [].concat(n);
let t = n[n.length - 1].nextSibling;
function i(o, s) {
e.insertBefore(o, s || t)
}
return e.__k = {
nodeType: 1,
parentNode: e,
firstChild: n[0],
childNodes: n,
insertBefore: i,
appendChild: i,
removeChild: function(o) {
e.removeChild(o)
}
}
}
```
# And a question :)
Is there a "debug friendly mode" in fresh?