From 53ceef41ee7d4abbf8dfc9a28075780015a34e93 Mon Sep 17 00:00:00 2001 From: Natt P Date: Sat, 24 Jun 2017 18:19:42 +0700 Subject: [PATCH 1/2] fix: Firebase.Database.Snapshot.exists function does not exists - always return True --- src/Firebase/Database/Snapshot.elm | 2 +- src/Native/Database/Snapshot.js | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Firebase/Database/Snapshot.elm b/src/Firebase/Database/Snapshot.elm index dd07679..eb2b37e 100644 --- a/src/Firebase/Database/Snapshot.elm +++ b/src/Firebase/Database/Snapshot.elm @@ -22,7 +22,7 @@ child = exists : Snapshot -> Bool exists = - Native.Database.exists + Native.Database.Snapshot.exists exportVal : Snapshot -> Json.Decode.Value diff --git a/src/Native/Database/Snapshot.js b/src/Native/Database/Snapshot.js index fee0609..cc44236 100644 --- a/src/Native/Database/Snapshot.js +++ b/src/Native/Database/Snapshot.js @@ -42,8 +42,6 @@ var _pairshaped$elm_firebase$Native_Database_Snapshot = function () { // eslint- var snapshot = snapshotModel.snapshot() return snapshot.exists() - ? { ctor: "True" } - : { ctor: "False" } } var exportVal = function (snapshotModel) { From 7fb149179bce78aae52b7abbd9ee21fa8649adf4 Mon Sep 17 00:00:00 2001 From: Natt P Date: Mon, 26 Jun 2017 12:41:56 +0700 Subject: [PATCH 2/2] fix: currentUser always return Nothing --- src/Native/Authentication.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Native/Authentication.js b/src/Native/Authentication.js index c12b7fe..b852747 100644 --- a/src/Native/Authentication.js +++ b/src/Native/Authentication.js @@ -52,11 +52,9 @@ var _pairshaped$elm_firebase$Native_Authentication = function () { // eslint-dis debug(".currentUser", authModel) var auth = authModel.auth() - return userToModel( - auth.currentUser - ? { ctor: "Just", _0: auth.currentUser } - : { ctor: "Nothing }"} - ) + return auth.currentUser + ? { ctor: "Just", _0: userToModel(auth.currentUser) } + : { ctor: "Nothing"} }