@contrast/agent 4.36.0 → 4.36.1

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.
@@ -46,11 +46,7 @@ function shouldSkip(data) {
46
46
 
47
47
  // split just returns the original string
48
48
  // if not passed an argument
49
- if (data.args.length === 0) {
50
- return true;
51
- }
52
-
53
- return false;
49
+ return data.args.length === 0;
54
50
  }
55
51
 
56
52
  /**
@@ -111,6 +107,10 @@ module.exports.handle = {
111
107
  } else {
112
108
  for (let i = 0; i < result.length; i++) {
113
109
  const stringPart = result[i];
110
+ if (!stringPart) {
111
+ continue;
112
+ }
113
+
114
114
  const stringPartLength = stringPart.length - 1;
115
115
 
116
116
  let stringStart = origString.indexOf(stringPart);
@@ -130,10 +130,6 @@ module.exports.handle = {
130
130
 
131
131
  indexOfFounds.add(stringStart + stringPartLength);
132
132
 
133
- if (stringPart.length === 0) {
134
- continue;
135
- }
136
-
137
133
  const newTagRanges = [];
138
134
  oldTagRanges.forEach((tag) => {
139
135
  const relation = new TagRange(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/agent",
3
- "version": "4.36.0",
3
+ "version": "4.36.1",
4
4
  "description": "Node.js security instrumentation by Contrast Security",
5
5
  "keywords": [
6
6
  "security",