INNER CODE UNIT · JavaScript

next

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

			let next = current.children.find(c => c.Name === parts[depth]) ?? null;
			if (next === null && createMissing) {
				console.debug(`Did not find '${parts[depth]}' in ${current.id}'s children ${current.children.map(c => c.Name).join(', ')}`);
				const path = parts.filter((_, i) => i <= depth).join('/');
				next = {
					id: encodeURIComponent(path),
					Name: parts[depth],
					Path: path,
					Type: 'Directory',
					children: [],
				};
				current.children.push(next);
			}
			current = next;
		}

		return current;
	}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…