native-document 1.0.85 → 1.0.86

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.
@@ -5013,13 +5013,13 @@ var NativeDocument = (function (exports) {
5013
5013
 
5014
5014
  function Link(options, children){
5015
5015
  const { to, href, ...attributes } = options;
5016
- const target = to || href;
5017
- if(Validator.isString(target)) {
5016
+ if(href) {
5018
5017
  const router = Router.get();
5019
- return Link$1({ ...attributes, href: target}, children).nd.onPreventClick(() => {
5020
- router.push(target);
5018
+ return Link$1({ ...attributes, href}, children).nd.onPreventClick(() => {
5019
+ router.push(href);
5021
5020
  });
5022
5021
  }
5022
+ const target = typeof to === 'string' ? { name: to } : to;
5023
5023
  const routerName = target.router || DEFAULT_ROUTER_NAME;
5024
5024
  const router = Router.get(routerName);
5025
5025
  if(!router) {