embed: nullish coalesce destructure

This commit is contained in:
Matilde Park 2021-05-07 12:31:30 -04:00
parent e44151e215
commit 4024707b5a

View File

@ -85,10 +85,10 @@ function GraphPermalink(
history.push(`/perma${permalink.slice(16)}`); history.push(`/perma${permalink.slice(16)}`);
}; };
const [nodeGroupHost, nodeGroupName] = association?.group.split('/').slice(-2); const [nodeGroupHost, nodeGroupName] = association?.group.split('/').slice(-2) ?? ['Unknown', 'Unknown'];
const [nodeChannelHost, nodeChannelName] = association?.resource const [nodeChannelHost, nodeChannelName] = association?.resource
.split('/') .split('/')
.slice(-2); .slice(-2) ?? ['Unknown', 'Unknown'];
const [ const [
locChannelName, locChannelName,
locChannelHost, locChannelHost,