@aimeloic/monkey-tester 1.0.9 → 1.0.10

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/htmlTemplate.js +2 -2
  2. package/package.json +1 -1
package/htmlTemplate.js CHANGED
@@ -151,7 +151,7 @@ function buildSidebar() {
151
151
 
152
152
  function makeInputString(type, id, placeholder, defaultValue) {
153
153
  const pAttr = placeholder ? ' placeholder="' + placeholder + '"' : '';
154
- const vAttr = defaultValue !== undefined ? ' value=\'' + defaultValue + '\'' : '';
154
+ const vAttr = defaultValue !== undefined ? ' value="' + defaultValue + '"' : '';
155
155
  return '<input type="' + type + '" id="' + id + '"' + pAttr + vAttr + ' />';
156
156
  }
157
157
 
@@ -230,7 +230,7 @@ async function sendRequest() {
230
230
 
231
231
  let body = undefined;
232
232
  if (ep.fields && ep.fields.length && ['POST', 'PUT', 'PATCH'].includes(ep.method)) {
233
- const rawVal = document.getElementById('field-' + ep.fields[0].name).value.trim();
233
+ const rawVal = document.getElementById('field-' + ep.fields[0].name)?.value?.trim() ?? '';
234
234
  try {
235
235
  JSON.parse(rawVal);
236
236
  body = rawVal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aimeloic/monkey-tester",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Auto route scanning visual runner dashboard.",
5
5
  "main": "index.js",
6
6
  "type": "module",