INNER CODE UNIT · JavaScript

nodeMap

AscensionGameDev/Intersect-Engine · Intersect.Server/wwwroot/js/assets.js:645

		const nodeMap = new Map(nodes.map(n => [n.id, n]));
		console.debug('Known nodes:', [...nodeMap.keys()]);
		for (let existingIndex = 0; existingIndex < this.#rows.length; ++existingIndex) {
			const existingElement = this.#rows[existingIndex];
			const existingElementId = existingElement.getAttribute('data-id');
			if (!existingElementId) {
				console.debug('Missing data-id', existingElement);
				continue;
			}

			/** @type {LocalStorageBrowseNode | null} */
			const node = nodeMap.get(existingElementId) ?? null;
			if (node === null) {
				console.debug(`Missing node for '${existingElementId}'`);
				existingElement.parentElement.removeChild(existingElement);
				continue;
			}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…