@iankibetsh/vue-streamline 1.3.6 → 1.3.7

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": "@iankibetsh/vue-streamline",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "Vue library for streamlining laravel backend services with @iankibet/streamline composer package",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -12,7 +12,10 @@ const useStreamline = (stream, ...initialArgs) => {
12
12
  const cacheKey = `streamline_${stream}_${initialArgs.join('_')}`
13
13
 
14
14
  // Inject headers and API endpoint
15
- const streamlineUrl = inject('streamlineUrl', window.streamlineUrl)
15
+ let streamlineUrl = inject('streamlineUrl', window.streamlineUrl)
16
+ if (streamlineUrl && streamlineUrl.startsWith('/') && !streamlineUrl.startsWith('//') && typeof window !== 'undefined') {
17
+ streamlineUrl = window.location.origin + streamlineUrl
18
+ }
16
19
  const enableCache = inject('enableCache', window.enableCache ?? true)
17
20
 
18
21
  const originalProps = reactive({})