Skip to content

Commit

Permalink
Merge pull request #49 from iliyaZelenko/master
Browse files Browse the repository at this point in the history
fix(history): fix error if no options for the extension
  • Loading branch information
iliyaZelenko authored Oct 6, 2019
2 parents 9477fa2 + af5e3be commit 6e6773b
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 6e6773b

Please sign in to comment.