@bookipi/htmlgenerator 1.1.19 → 1.1.20

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.
@@ -9286,11 +9286,17 @@ var defaultLang = {
9286
9286
 
9287
9287
  var sanitizeHtml = require("sanitize-html");
9288
9288
 
9289
- function sanitize(object) {
9289
+ function sanitize(obj) {
9290
+ var object = obj;
9291
+
9290
9292
  if (typeof object === "undefined" || object === null || object === undefined) {
9291
9293
  return object;
9292
9294
  }
9293
9295
 
9296
+ if (obj.toObject) {
9297
+ object = obj.toObject();
9298
+ }
9299
+
9294
9300
  if (object instanceof Array) {
9295
9301
  return object.map(function (obj) {
9296
9302
  return sanitize(obj);