-
Hello! Thanks for your plugin! But I got a problem. I am using plugin system and getting JS error in Safari (12v & 13v). Please help me fix this. SyntaxError: Unexpected token '='. Expected an opening '(' before a method's parameter list. And my code:
|
Beta Was this translation helpful? Give feedback.
Answered by
idiotWu
Mar 19, 2021
Replies: 1 comment
-
The class field syntax is not yet supported in Safari, so you may need a transpiler like babel, or move the // Init Scrollbar Plugin
class BlockScroll extends Scrollbar.ScrollbarPlugin {
transformDelta(delta) {
return this.options.open ? {
x: 0,
y: 0
} : delta;
}
}
BlockScroll.pluginName = 'modal';
BlockScroll.defaultOptions = {
open: false,
};
Scrollbar.use(BlockScroll); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
idiotWu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The class field syntax is not yet supported in Safari, so you may need a transpiler like babel, or move the
static ... =
declarations out of the classes: