Structure upgrade: delete session.signed_in_as key instead of setting to null
[ndcode_site.git] / my_account / index.html.jst
index 403ba6f..fe11c4b 100644 (file)
@@ -11,12 +11,13 @@ return async env => {
 
   // see whether signed in, if so preload details, and draft details if any
   let transaction = await env.site.database.Transaction()
-  let signed_in_as, details, draft_details
+  let signed_in_as
+  let details, draft_details
   try {
     let root = await transaction.get({})
 
     let session = await get_session(env, root)
-    signed_in_as = await session.get_json('signed_in_as', null)
+    signed_in_as = await session.get_json('signed_in_as')
 
     let account = await get_account(root, session)
     if (account !== undefined) {
@@ -56,7 +57,7 @@ return async env => {
     async _out => {
       await breadcrumbs(env, _out)
 
-      if (signed_in_as !== null) {
+      if (signed_in_as !== undefined) {
         // signed in
         p {'Your given names are visible to other users if you comment on our blog. Your email and family name remain private. If your name is one word or does not fit given names/family name pattern, then please enter given names only.'}
 
@@ -205,7 +206,7 @@ return async env => {
         }
       }
 
-      if (signed_in_as !== null) {
+      if (signed_in_as !== undefined) {
         //script(src="/js/api_call.js") {}
 
         script {