From f4c39bc72779317cce851cf6f782ae5faef97a79 Mon Sep 17 00:00:00 2001
From: Yuanle Song <sylecn@gmail.com>
Date: Fri, 27 Jan 2017 21:56:56 +0800
Subject: [PATCH] bugfix: ** is not supported in firefox

use Math.pow() instead.
---
 fsm.js      | 4 ++--
 operational | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fsm.js b/fsm.js
index 4eb079a..cdbb476 100644
--- a/fsm.js
+++ b/fsm.js
@@ -366,7 +366,7 @@ var fsm = function () {
 			    this.snapshots.pop();
 			    return;
 			}
-			r = num ** 0.5;
+			r = Math.pow(num, 0.5);
 		    	this.numberStack.push(r);
 			debug("trail push " + [keyName, shortKeyName(keyName), r]);
 			this.trail.push([shortKeyName(keyName), r]);
@@ -398,7 +398,7 @@ var fsm = function () {
 			}
 		    	break;
 		    case keyNames.power:
-			if (! this.doBinaryOperator(keyName, (lhs, rhs) => lhs ** rhs)) {
+			if (! this.doBinaryOperator(keyName, (lhs, rhs) => Math.pow(lhs, rhs))) {
 			    return;
 			}
 		    	break;
diff --git a/operational b/operational
index 7fe2d75..87ac929 100644
--- a/operational
+++ b/operational
@@ -82,6 +82,9 @@ doesn't work with <td> in firefox.
 
 ** 2017-01-26 make it work offline, add sw.js
 * done                                                                :entry:
+** 2017-01-27 bug: ** is not supported in firefox.
+use Math.pow() instead.
+
 ** 2017-01-27 accept keyboard event as well.		     :low:featurereq:
 - num0 to num9
 - dot
-- 
GitLab