bfg-common 1.0.2 → 1.0.4

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,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.0.2",
4
+ "version": "1.0.4",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -191,19 +191,17 @@ export default defineNuxtPlugin(() => {
191
191
 
192
192
  self.createAbsolutePathRecursion = (
193
193
  node: any,
194
- parentProp: string,
195
- valueProp: string
194
+ valueProp: string,
195
+ parentProp: string
196
196
  ): string => {
197
197
  if (!node) return ''
198
198
 
199
- return (
200
- node[valueProp] +
201
- self.createAbsolutePathRecursion(
202
- node[parentProp],
203
- parentProp,
204
- valueProp
205
- )
199
+ const parentPath = self.createAbsolutePathRecursion(
200
+ node[parentProp],
201
+ valueProp,
202
+ parentProp
206
203
  )
204
+ return (parentPath ? `${parentPath}/` : '') + node[valueProp]
207
205
  }
208
206
 
209
207
  return self