ES6/Babel Class constructor cannot be invoked without 'new'
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to create a custom Quill theme, extending the bubble one. I'm facing a strange ES6 inheritance problem, where it seems I cannot call super() in my constructor. Here is my code: import BubbleTheme, { BubbleTooltip } from 'quill/themes/bubble' class LoopTheme extends BubbleTheme { constructor (quill, options) { super(quill, options) } extendToolbar (toolbar) { super.extendToolbar(toolbar) this.tooltip = new LoopTooltip(this.quill, this.options.bounds); this.tooltip.root.appendChild(toolbar.container); } } class LoopTooltip extends