if not enabled return original object

This commit is contained in:
Iuri Matias 2019-11-09 06:28:18 -05:00
parent 5f94848d05
commit f15e36a7c6
1 changed files with 1 additions and 0 deletions

View File

@ -20,6 +20,7 @@ class StructLog {
}
tagObject(ogObject, logId) {
if (!this.isEnabled()) return ogObject;
let newObject = Object.assign({}, ogObject, { logId });
Object.setPrototypeOf(newObject, ogObject);
return newObject;