From 5561ababe3d640f62753e26ca93f8f568c9da3ce Mon Sep 17 00:00:00 2001
From: Alejandro <alejandroalonsofernandez@gmail.com>
Date: Fri, 27 Mar 2020 15:07:25 +0100
Subject: [PATCH] fix(vue-class-component): path attachment to route components
 (#32)

closes #31
---
 index.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/index.js b/index.js
index 70a974c..a947043 100644
--- a/index.js
+++ b/index.js
@@ -11,6 +11,10 @@ export default function install(Vue, {routes}) {
 
   Object.keys(routes).map(path => {
     routes[path].component.__path = path
+    // this is required to attach the path to vue-class-components. See #31
+    if(routes[path].component.options) {
+      routes[path].component.options.__path = path;
+    }
   })
 
   Vue.mixin({