File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -254,7 +254,11 @@ var constructor = function () {
254254 }
255255
256256 function processEvent ( event ) {
257- if ( ! isKitReady ( ) ) {
257+ if (
258+ ! isKitReady ( ) ||
259+ ! self . store ||
260+ ! self . store . hasOwnProperty ( 'setLocalSessionAttribute' )
261+ ) {
258262 return ;
259263 }
260264
@@ -266,11 +270,7 @@ var constructor = function () {
266270
267271 if ( self . placementEventMappingLookup [ hashedEvent ] ) {
268272 var mappedValue = self . placementEventMappingLookup [ hashedEvent ] ;
269- if ( self . store ) {
270- var attrs = { } ;
271- attrs [ mappedValue ] = true ;
272- self . store . setLocalSessionAttributes ( attrs ) ;
273- }
273+ self . store . setLocalSessionAttribute ( mappedValue , true ) ;
274274 }
275275 }
276276
Original file line number Diff line number Diff line change @@ -81,8 +81,8 @@ describe('Rokt Forwarder', () => {
8181 } ;
8282 mParticle . _Store = {
8383 localSessionAttributes : { } ,
84- setLocalSessionAttributes : function ( attributes ) {
85- this . localSessionAttributes = attributes ;
84+ setLocalSessionAttribute : function ( key , value ) {
85+ this . localSessionAttributes [ key ] = value ;
8686 } ,
8787 getLocalSessionAttributes : function ( ) {
8888 return this . localSessionAttributes ;
You can’t perform that action at this time.
0 commit comments