Skip to content

Commit

Permalink
fix(history): fix error if no options for the extension
Browse files Browse the repository at this point in the history
  • Loading branch information
iliyaZelenko committed Oct 6, 2019
1 parent db5c15c commit af5e3be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion demo/config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const MAIN_MODULE = import('../dist/bundle-cjs') // '../dist/bundle-cjs'
export const MAIN_MODULE = import('../src/main') // '../dist/bundle-cjs'
// export const MAIN_MODULE = import('../dist/bundle-esm') // '../dist/bundle-cjs'
5 changes: 1 addition & 4 deletions demo/pages/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,7 @@ export default {
CodeBlock,
HorizontalRule,
Paragraph,
[History, {
// если не нужны кнокпи
options: { noActions: true }
}],
History,
HardBreak, // позволяет переносить через Shift + Ctrl + Enter
Underline,
Strike,
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/nativeExtensions/History.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default class History extends AbstractExtension {

get availableActions (): ExtensionActionInterface[] {
// если не нужны кнокпи
if (this.options.noActions) return []
if (this.options && this.options.noActions) return []

return [
{
Expand Down

0 comments on commit af5e3be

Please sign in to comment.