@optimiser/common 1.0.382 → 1.0.383

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.
@@ -4789,7 +4789,8 @@ function ValidateUserInput(options) {
4789
4789
  }
4790
4790
  field = schemaFields.find(function (x) { return x.Name == fieldName; });
4791
4791
  if (!field) return [3 /*break*/, 58];
4792
- if (IsStringValue(fieldData)) { //sanitizing Html
4792
+ //sanitizing Html and added IgnoreSanitizeHtml condition so that it can be ignored for certain fields
4793
+ if (!field.IgnoreSanitizeHtml && IsStringValue(fieldData)) {
4793
4794
  inputFields[fieldName] = (0, sanitize_html_1.default)(fieldData);
4794
4795
  fieldData = inputFields[fieldName];
4795
4796
  }
@@ -5676,7 +5677,7 @@ function ValidateStateCountryField(fieldSchema, updateObj, fldName, objectSchema
5676
5677
  case 0:
5677
5678
  if (!((fieldSchema === null || fieldSchema === void 0 ? void 0 : fieldSchema.LookupObject) === 'City')) return [3 /*break*/, 3];
5678
5679
  if (!cityfield) return [3 /*break*/, 2];
5679
- return [4 /*yield*/, db.collection('City').findOne({ _id: updateObj[fldName] })];
5680
+ return [4 /*yield*/, db.collection('City').findOne({ _id: cityfield })];
5680
5681
  case 1:
5681
5682
  cityDocument = _a.sent();
5682
5683
  if (cityDocument) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimiser/common",
3
- "version": "1.0.382",
3
+ "version": "1.0.383",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {