@live-change/email-service 0.8.20 → 0.8.21

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/render.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/email-service",
3
- "version": "0.8.20",
3
+ "version": "0.8.21",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "url": "https://www.viamage.com/"
22
22
  },
23
23
  "dependencies": {
24
- "@live-change/framework": "^0.8.20",
24
+ "@live-change/framework": "0.8.21",
25
25
  "got": "^11.8.3",
26
26
  "html-to-text": "8.1.0",
27
27
  "inline-css": "4.0.2",
@@ -29,6 +29,6 @@
29
29
  "juice": "9.1.0",
30
30
  "nodemailer": "^6.7.2"
31
31
  },
32
- "gitHead": "e238d89b80f45ddaf9e92bc3d07459870a14e07b",
32
+ "gitHead": "4453aa639a9fe1a857d93d73ebd28a82c97fdd87",
33
33
  "type": "module"
34
34
  }
package/render.js CHANGED
@@ -41,7 +41,7 @@ definition.authenticator({
41
41
  function processElement(element, images) {
42
42
  for(let i = 0; i < element.attributes.length; i++) {
43
43
  const attribute = element.attributes[i]
44
- const remove = attribute.nodeName == 'class' || attribute.nodeName.slice(0, 4) == 'data'
44
+ const remove = attribute.nodeName === 'class' || attribute.nodeName.slice(0, 4) === 'data'
45
45
  if(remove) {
46
46
  element.removeAttribute(attribute.nodeName)
47
47
  i--
@@ -112,7 +112,7 @@ async function renderEmail(data) {
112
112
  }
113
113
  if(toText !== null) {
114
114
  email.text = htmlToText(messageElement.outerHTML)
115
- if(messageElement.tagName == 'PRE') {
115
+ if(messageElement.tagName === 'PRE') {
116
116
  const indentation = email.text.match(/^ */)[0]
117
117
  const indentationRegex = new RegExp('\n' + indentation, 'g')
118
118
  email.text = email.text.slice(indentation.length).replace(indentationRegex, '\n')