diff --git a/CHANGELOG.md b/CHANGELOG.md
index 81266cae..83afbd5b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-# 1.2.7
+# 1.2.8
- Data retracted incorrectly in CLJS #404
diff --git a/README.md b/README.md
index 5fb354e0..c0db3ca9 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ The intention with DataScript is to be a basic building block in client-side app
## Latest version [![Build Status](https://travis-ci.org/tonsky/datascript.svg?branch=master)](https://travis-ci.org/tonsky/datascript)
```clj
-[datascript "1.2.7"]
+[datascript "1.2.8"]
```
## Support us
@@ -166,7 +166,7 @@ For more examples, see [our acceptance test suite](test/datascript/test/).
DataScript can be used from any JS engine without additional dependencies:
```html
-
+
```
or as a CommonJS module ([npm page](https://www.npmjs.org/package/datascript)):
diff --git a/project.clj b/project.clj
index 661f07cc..d02e0348 100644
--- a/project.clj
+++ b/project.clj
@@ -1,4 +1,4 @@
-(def version "1.2.7")
+(def version "1.2.8")
(defproject datascript (str version (System/getenv "DATASCRIPT_CLASSIFIER"))
:description "An implementation of Datomic in-memory database and Datalog query engine in ClojureScript"
diff --git a/release-js/package.json b/release-js/package.json
index afe35a18..0495032c 100644
--- a/release-js/package.json
+++ b/release-js/package.json
@@ -1,6 +1,6 @@
{
"name": "datascript",
- "version": "1.2.7",
+ "version": "1.2.8",
"description": "Immutable in-memory triplestore with Datalog queries",
"homepage": "https://github.com/tonsky/datascript",
"author": "Nikita Prokopov (https://github.com/tonsky)",
diff --git a/release-js/wrapper.prefix b/release-js/wrapper.prefix
index d8c0bef2..fdcb237b 100644
--- a/release-js/wrapper.prefix
+++ b/release-js/wrapper.prefix
@@ -1,5 +1,5 @@
/**
- * Datascript v1.2.7
+ * Datascript v1.2.8
*
* Copyright 2014-2021 Nikita Prokopov
*
diff --git a/src/datascript/db.cljc b/src/datascript/db.cljc
index 411e4986..86d17326 100644
--- a/src/datascript/db.cljc
+++ b/src/datascript/db.cljc
@@ -352,7 +352,7 @@
#?@(:clj [(instance? Comparable x) (.compareTo ^Comparable x y)]
:cljs [(satisfies? IComparable x) (-compare x y)])
(not (class-identical? x y)) (class-compare x y)
- #?@(:cljs [(or (string? x) (array? x) (true? x) (false? x)) (garray/defaultCompare x y)])
+ #?@(:cljs [(or (number? x) (string? x) (array? x) (true? x) (false? x)) (garray/defaultCompare x y)])
:else (- (hash x) (hash y)))
(catch #?(:clj ClassCastException :cljs js/Error) e
(if (not (class-identical? x y))
diff --git a/test/datascript/test/transact.cljc b/test/datascript/test/transact.cljc
index c33c8a64..e13bf179 100644
--- a/test/datascript/test/transact.cljc
+++ b/test/datascript/test/transact.cljc
@@ -441,6 +441,11 @@
(vec (d/datoms db' :avet :index {:map 3} 1 )))))
))
+(deftest test-compare-numbers-js-404
+ (let [db (d/db-with (d/empty-db) [{:num 42.5}])
+ db' (d/db-with db [[:db/retract 1 :num 42]])]
+ (is (= #{[1 :num 42.5]} (tdc/all-datoms db')))))
+
(deftest test-transitive-type-compare-386
(let [txs [[{:block/uid "2LB4tlJGy"}]
[{:block/uid "2ON453J0Z"}]