@stencil/vue-output-target
Advanced tools
Comparing version 0.5.1-2 to 0.5.1-3
{ | ||
"name": "@stencil/vue-output-target", | ||
"version": "0.5.1-2", | ||
"version": "0.5.1-3", | ||
"description": "Vue output target for @stencil/core components.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -11,3 +11,3 @@ import { VNode, defineComponent, getCurrentInstance, h, inject, ref, Ref } from 'vue'; | ||
const NAV_MANAGER = 'navManager'; | ||
const ROUTER_PROP_REFIX = 'router'; | ||
const ROUTER_PROP_PREFIX = 'router'; | ||
@@ -111,9 +111,11 @@ /** | ||
const routerProps = Object.keys(props).filter(p => p.startsWith(ROUTER_PROP_REFIX)); | ||
if (navManager !== undefined) { | ||
let navigationPayload: any = { event: ev }; | ||
routerProps.forEach(prop => { | ||
navigationPayload[prop] = props[prop]; | ||
}); | ||
for (const key in props) { | ||
const value = props[key]; | ||
if (props.hasOwnProperty(key) && key.startsWith(ROUTER_PROP_PREFIX) && value !== EMPTY_PROP) { | ||
navigationPayload[key] = value; | ||
} | ||
} | ||
navManager.navigate(navigationPayload); | ||
@@ -120,0 +122,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
48076
995