Skip to content

Commit dccfc03

Browse files
committed
Added readme file
1 parent 4f8551a commit dccfc03

File tree

1 file changed

+5
-3
lines changed
  • packages/renderer/src/components

1 file changed

+5
-3
lines changed

packages/renderer/src/components/Home.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import 'splitpanes/dist/splitpanes.css';
4646
4747
type mdData = {
4848
editor: ace.Editor | null,
49-
markdownCode: string | null,
49+
markdownCode: string | undefined,
5050
content: string | undefined,
5151
}
5252
@@ -56,7 +56,7 @@ export default defineComponent({
5656
setup() {
5757
const markDownData: mdData = reactive({
5858
editor: null,
59-
markdownCode: null,
59+
markdownCode: undefined,
6060
content: undefined,
6161
});
6262
@@ -67,7 +67,9 @@ export default defineComponent({
6767
});
6868
6969
ipcRendReceive('fetch-data', () => {
70-
ipcSendData(markDownData.markdownCode);
70+
if (markDownData.markdownCode) {
71+
ipcSendData(markDownData.markdownCode);
72+
}
7173
});
7274
7375
function initAceEditor()

0 commit comments

Comments
 (0)