Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import debounce from 'lodash/debounce';
import nanoid from 'nanoid';
import { initializeIcons } from '@uifabric/icons';
import { ExpressionEngine } from 'botbuilder-expression-parser';
import { seedNewDialog } from '@bfc/shared';
import { seedNewDialog, LuFile, DialogInfo, ShellApi } from '@bfc/shared';

import Example from '../../src';
import { ShellApi, LuFile, DialogInfo } from '../../src/types';
import { buildDialogOptions } from '../../src/Form/utils';

import editorSchema from './editorschema.json';
Expand Down Expand Up @@ -163,6 +162,8 @@ const mockShellApi = [
'createLgTemplate',
'updateLgTemplate',
'validateExpression',
'onFocusSteps',
'onFocusEvent',
].reduce((mock, api) => {
mock[api] = (...args) =>
new Promise(resolve => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const LgEditorWidget: React.FC<LgEditorWidgetProps> = props => {
);

const template = (lgFile &&
lgFile.templates &&
lgFile.templates.find(template => {
return template.Name === lgId;
})) || {
Expand All @@ -68,7 +69,7 @@ export const LgEditorWidget: React.FC<LgEditorWidgetProps> = props => {

// only do this once
const allContent = useMemo(() => {
if (!lgFile) {
if (!lgFile || !lgFile.templates) {
return '';
}

Expand Down