drapcode-utility 2.6.8 → 2.7.0

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.
@@ -683,7 +683,6 @@ const fillDefaultValues = (collection, itemdata) => {
683
683
  isEmptyArray ||
684
684
  isInvalidBoolean) {
685
685
  const formattedField = JSON.parse(JSON.stringify(field));
686
- console.log("These are the field types: ", field.type, typeof field.type);
687
686
  if (field.type === "static_option") {
688
687
  if (formattedField.extraFieldSetting?.staticDefaultValue?.length > 0) {
689
688
  filledItemData[fieldName] =
@@ -1091,6 +1090,8 @@ const evaluateJSLogic = function (expression, data, user, envConstants) {
1091
1090
  expression = expression
1092
1091
  ? (0, exports.getSpecialCharectorReplacedExpression)(expression)
1093
1092
  : " ";
1093
+ // Changing <br/> to /n for js code
1094
+ expression = expression.replace(/<br\s*\/?>/g, "\n");
1094
1095
  const replacedExpression = (0, exports.replaceDataValueIntoExpression)(expression, data, user, {}, {}, {}, {}, envConstants, {}, {}, {});
1095
1096
  try {
1096
1097
  const replacedExpressionFunction = new Function(replacedExpression.toString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drapcode-utility",
3
- "version": "2.6.8",
3
+ "version": "2.7.0",
4
4
  "description": "DrapCode Utility",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",