diff --git a/src/Explorer/Controls/NotebookViewer/NotebookViewerComponent.tsx b/src/Explorer/Controls/NotebookViewer/NotebookViewerComponent.tsx index d98dd2cef..e73b23a4f 100644 --- a/src/Explorer/Controls/NotebookViewer/NotebookViewerComponent.tsx +++ b/src/Explorer/Controls/NotebookViewer/NotebookViewerComponent.tsx @@ -15,7 +15,6 @@ import { Dialog, DialogProps, TextFieldProps } from "../Dialog"; import { NotebookMetadataComponent } from "./NotebookMetadataComponent"; import "./NotebookViewerComponent.less"; import Explorer from "../../Explorer"; -import { NotebookV4 } from "@nteract/commutable/lib/v4"; import { SessionStorageUtility } from "../../../Shared/StorageUtility"; import { DialogHost } from "../../../Utils/GalleryUtils"; import { getErrorMessage, getErrorStack, handleError } from "../../../Common/ErrorHandlingUtils"; @@ -103,7 +102,7 @@ export class NotebookViewerComponent ); const notebook: Notebook = await response.json(); - this.removeNotebookViewerLink(notebook, this.props.galleryItem?.newCellId); + GalleryUtils.removeNotebookViewerLink(notebook, this.props.galleryItem?.newCellId); this.notebookComponentBootstrapper.setContent("json", notebook); this.setState({ content: notebook, showProgressBar: false }); @@ -133,17 +132,6 @@ export class NotebookViewerComponent } } - private removeNotebookViewerLink = (notebook: Notebook, newCellId: string): void => { - if (!newCellId) { - return; - } - const notebookV4 = notebook as NotebookV4; - if (notebookV4 && notebookV4.cells[0].source[0].search(newCellId)) { - delete notebookV4.cells[0]; - notebook = notebookV4; - } - }; - public render(): JSX.Element { return (