You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flagon.apache.org by po...@apache.org on 2021/02/20 21:30:27 UTC
[incubator-flagon-useralejs] branch test updated:
[flagon-userale-32] fixes issue with sessionID not being written properly
This is an automated email from the ASF dual-hosted git repository.
poorejc pushed a commit to branch test
in repository https://gitbox.apache.org/repos/asf/incubator-flagon-useralejs.git
The following commit(s) were added to refs/heads/test by this push:
new 3634655 [flagon-userale-32] fixes issue with sessionID not being written properly
3634655 is described below
commit 36346554a278f8b9711be526c34df1434983b169
Author: poorejc <po...@apache.org>
AuthorDate: Sat Feb 20 16:30:14 2021 -0500
[flagon-userale-32] fixes issue with sessionID not being written properly
---
build/UserAleWebExtension/content.js | 2 +-
build/userale-2.1.1.js | 2 +-
build/userale-2.1.1.min.js | 2 +-
example/index.js | 1 -
src/getInitialSettings.js | 2 +-
5 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/build/UserAleWebExtension/content.js b/build/UserAleWebExtension/content.js
index 5610112..465aa18 100644
--- a/build/UserAleWebExtension/content.js
+++ b/build/UserAleWebExtension/content.js
@@ -113,7 +113,7 @@ function getInitialSettings() {
function getSessionId(sessionKey, value){
if (window.sessionStorage.getItem(sessionKey) === null) {
window.sessionStorage.setItem(sessionKey, JSON.stringify(value));
- return JSON.stringify(value);
+ return value;
}
return JSON.parse(window.sessionStorage.getItem(sessionKey));
diff --git a/build/userale-2.1.1.js b/build/userale-2.1.1.js
index 35f1b98..cbe3568 100644
--- a/build/userale-2.1.1.js
+++ b/build/userale-2.1.1.js
@@ -87,7 +87,7 @@
function getSessionId(sessionKey, value){
if (window.sessionStorage.getItem(sessionKey) === null) {
window.sessionStorage.setItem(sessionKey, JSON.stringify(value));
- return JSON.stringify(value);
+ return value;
}
return JSON.parse(window.sessionStorage.getItem(sessionKey));
diff --git a/build/userale-2.1.1.min.js b/build/userale-2.1.1.min.js
index 037824f..f9c7145 100644
--- a/build/userale-2.1.1.min.js
+++ b/build/userale-2.1.1.min.js
@@ -15,4 +15,4 @@
* limitations under the License.
* @preserved
*/
-!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).userale={})}(this,function(t){"use strict";var e="2.1.1",r=null;function n(t,o){Object.keys(o).forEach(function(e){var n;"userFromParams"!==e||(n=function(e){e=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),e=window.location.href.match(e);return e&&e[2]?decodeURIComponent(e[2].replace(/\+/g," ")):null} [...]
\ No newline at end of file
+!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).userale={})}(this,function(t){"use strict";var e="2.1.1",r=null;function n(t,o){Object.keys(o).forEach(function(e){var n;"userFromParams"!==e||(n=function(e){e=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)"),e=window.location.href.match(e);return e&&e[2]?decodeURIComponent(e[2].replace(/\+/g," ")):null} [...]
\ No newline at end of file
diff --git a/example/index.js b/example/index.js
index 67699c2..21d5113 100644
--- a/example/index.js
+++ b/example/index.js
@@ -22,7 +22,6 @@ const changeMe = "me";
window.userale.options({
'userId': changeMe,
'logDetails': true,
- 'sessionID': 'this one',
'toolName': 'Apache UserALE.js Example (Custom)'
});
diff --git a/src/getInitialSettings.js b/src/getInitialSettings.js
index 4b04d6f..01abf4c 100644
--- a/src/getInitialSettings.js
+++ b/src/getInitialSettings.js
@@ -61,7 +61,7 @@ export function getInitialSettings() {
export function getSessionId(sessionKey, value){
if (window.sessionStorage.getItem(sessionKey) === null) {
window.sessionStorage.setItem(sessionKey, JSON.stringify(value));
- return JSON.stringify(value);
+ return value;
}
return JSON.parse(window.sessionStorage.getItem(sessionKey));