node-red-contrib-typescript 1.0.4 → 1.0.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-typescript",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "description": "",
5
5
  "author": "kezziny",
6
6
  "license": "ISC",
@@ -64,7 +64,7 @@ module.exports = function(RED) {
64
64
  target = target.substring(1);
65
65
  }
66
66
  if (target.startsWith("./")) {
67
- if ("".indexOf("/") !== -1) {
67
+ if (node.config.name.indexOf("/") !== -1) {
68
68
  let count = node.config.name.lastIndexOf("/") + 1;
69
69
  let pathSuffix = node.config.name.substring(0, count);
70
70
  target = path + pathSuffix + target.substring(2);
@@ -122,7 +122,7 @@ module.exports = function(RED) {
122
122
  target = target.substring(1);
123
123
  }
124
124
  if (target.startsWith("./")) {
125
- if ("".indexOf("/") !== -1) {
125
+ if (node.config.name.indexOf("/") !== -1) {
126
126
  let count = node.config.name.lastIndexOf("/") + 1;
127
127
  let pathSuffix = node.config.name.substring(0, count);
128
128
  target = path + pathSuffix + target.substring(2);
@@ -177,4 +177,4 @@ module.exports = function(RED) {
177
177
  });
178
178
  }
179
179
  RED.nodes.registerType("typescript", TypescriptInstance);
180
- }
180
+ }