Skip to content

Commit cfcde19

Browse files
Address PR Comments
1 parent 603f911 commit cfcde19

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/Rokt-Kit.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ var constructor = function () {
157157

158158
function returnLocalSessionAttributes() {
159159
if (
160+
isEmpty(self.placementEventMappingLookup) ||
160161
!window.mParticle.Rokt ||
161162
typeof window.mParticle.Rokt.getLocalSessionAttributes !==
162163
'function'
@@ -500,13 +501,7 @@ function hashEventMessage(messageType, eventType, eventName) {
500501
}
501502

502503
function isEmpty(value) {
503-
return (
504-
value === null ||
505-
value === undefined ||
506-
(typeof value === 'object' && Object.keys(value).length === 0) ||
507-
(typeof value === 'string' && value.length === 0) ||
508-
(Array.isArray(value) && value.length === 0)
509-
);
504+
return value == null || !(Object.keys(value) || value).length;
510505
}
511506

512507
if (window && window.mParticle && window.mParticle.addForwarder) {

0 commit comments

Comments
 (0)