We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 456c8ff commit a21229eCopy full SHA for a21229e
rollup.config.js
@@ -17,7 +17,7 @@ function getMetablock () {
17
export default {
18
input: 'src/main.js',
19
output: {
20
- sourcemap: false,
+ sourcemap: production ? false : "inline",
21
format: 'iife',
22
name: 'calc',
23
file: 'build/userscript.user.js',
src/ActionButton.svelte
@@ -5,7 +5,11 @@
5
export let action;
6
7
function act () {
8
- if ($currAction) currNum.set($currAction(+$secNum, +$currNum));
+ if ($currAction) {
9
+ const res = $currAction(+$secNum, +$currNum);
10
+ if (!Number.isFinite(res)) throw new Error(`Bad result: ${res}`);
11
+ currNum.set(res);
12
+ }
13
currAction.set(action);
14
if ($currNum) {
15
secNum.set($currNum);
0 commit comments