This commit is contained in:
Akuoko Daniel Jnr 2021-02-19 18:16:35 +00:00
parent 18dca5eb3b
commit 8eb3297490
No known key found for this signature in database
GPG Key ID: 1C95803CACD3E9DC

View File

@ -313,16 +313,16 @@ class SlatePage extends React.Component {
/* NOTE(daniel): If user was redirected to this page, the cid of the slate object will exist in the page props.
We'll use the cid to open the global carousel */
if (cid) {
const index = this.getItemIndexByCID(cid);
Events.dispatchCustomEvent({
name: "slate-global-open-carousel",
detail: { index },
});
return;
if (Strings.isEmpty(cid)) {
return null;
}
const index = this.getItemIndexByCID(cid);
Events.dispatchCustomEvent({
name: "slate-global-open-carousel",
detail: { index },
});
};
getItemIndexByCID = (cid) => {