fix(commons): fix sanitize not return value.

This commit is contained in:
Ivan Li 2021-03-27 22:31:21 +08:00
parent 8e3dea7099
commit bd045c6abe

View File

@ -16,6 +16,12 @@ export class SanitizePipe implements PipeTransform {
return value; return value;
} }
value = Object.assign(new constructorFunction(), value); value = Object.assign(new constructorFunction(), value);
try {
sanitize(value); sanitize(value);
return value;
} catch (err) {
console.error(err);
throw err;
}
} }
} }