@forklaunch/core 1.6.6 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1211,23 +1211,14 @@ function wrapEmWithTenantContext(em, tenantId) {
|
|
|
1211
1211
|
tenantId,
|
|
1212
1212
|
() => value.apply(target, args)
|
|
1213
1213
|
);
|
|
1214
|
-
return rebind(result, target, proxy
|
|
1214
|
+
return rebind(result, target, proxy);
|
|
1215
1215
|
};
|
|
1216
1216
|
}
|
|
1217
1217
|
});
|
|
1218
1218
|
return proxy;
|
|
1219
1219
|
}
|
|
1220
|
-
function rebind(result, target, proxy
|
|
1221
|
-
|
|
1222
|
-
return proxy;
|
|
1223
|
-
}
|
|
1224
|
-
if (isEntityManager(result) && result !== proxy) {
|
|
1225
|
-
return wrapEmWithTenantContext(result, tenantId);
|
|
1226
|
-
}
|
|
1227
|
-
return result;
|
|
1228
|
-
}
|
|
1229
|
-
function isEntityManager(value) {
|
|
1230
|
-
return typeof value === "object" && value !== null && "fork" in value && typeof value.fork === "function" && "flush" in value && typeof value.flush === "function" && "persist" in value && typeof value.persist === "function";
|
|
1220
|
+
function rebind(result, target, proxy) {
|
|
1221
|
+
return result === target ? proxy : result;
|
|
1231
1222
|
}
|
|
1232
1223
|
export {
|
|
1233
1224
|
ComplianceLevel,
|