Skip to content

TypeError: Cannot read properties of null (reading 'replaceChild') #5

@mdmontesinos

Description

@mdmontesinos

I'm using usal from the CDN and I constantly get the following error:

usal.min.js?v=1.3.0:1 Uncaught TypeError: Cannot read properties of null (reading 'replaceChild')
    at usal.min.js?v=1.3.0:1:9603

Also, when checking the rendered HTML, I saw that's it's generating a weird structure with way too much nesting:

<header class="d-flex mb-3 flex-nowrap " data-usal="fade-u split-letter split-delay-50 once">
	<h1 class="fw-light ms-auto me-auto ms-sm-auto me-sm-auto" style="">
		<span class="app-moduletitle">
			<span>
				<span>
					<span>
						<span>
							<span>
								<span>W</span>
							</span>
						</span>
					</span>
					<span>
						<span>
							<span>
								<span>h</span>
							</span>
						</span>
					</span>
					<span>
						<span>
							<span>
								<span>a</span>
							</span>
						</span>
					</span>
					<span>
						<span>
							<span>
								<span>t</span>
							</span>
						</span>
					</span>
				</span>
				<span>
					<span>
						<span>
							<span>
								<span>W</span>
							</span>
						</span>
					</span>
					<span>
						<span>
							<span>
								<span>e</span>
							</span>
						</span>
					</span>
				</span>
				<span>
					<span>
						<span>
							<span>
								<span>D</span>
							</span>
						</span>
					</span>
					<span>
						<span>
							<span>
								<span>o</span>
							</span>
						</span>
					</span>
				</span>
			</span>
		</span>
	</h1>
</header>

This probably is related to DOM manipulation, as I'm using the Blazor framework with enhanced navigation:

Enhanced navigation (same-document navigation): Blazor intercepts the request and performs a fetch request instead. Blazor then patches the response content into the page's DOM.

Is USAL compatible with DOM manipulation?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions