-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👽️ Apply changes from external libraries
- Loading branch information
Showing
8 changed files
with
33 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,13 +51,19 @@ Router.setProperty(function current_url() { | |
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 1.3.10 | ||
* @version 1.3.10 | ||
* @version 1.4.0 | ||
* | ||
* @type {Object} | ||
*/ | ||
Router.setProperty(function current_route() { | ||
|
||
let route_name = this.view_render?.variables?.__route; | ||
const variables = this.view_render?.variables; | ||
|
||
if (!variables) { | ||
return; | ||
} | ||
|
||
let route_name = variables.get('__route'); | ||
|
||
if (!route_name) { | ||
return; | ||
|
@@ -157,7 +163,7 @@ Router.setMethod(function applyDirective(element, name, options) { | |
let variables = element[Hawkejs.VARIABLES]; | ||
|
||
if (variables) { | ||
val = variables[key]; | ||
val = variables.get(key); | ||
} | ||
} | ||
|
||
|
@@ -215,7 +221,7 @@ Router.setMethod(function applyDirective(element, name, options) { | |
element.setAttribute('hreflang', url._chosen_prefix); | ||
} | ||
|
||
if (config && this.renderer.variables.__route) { | ||
if (config && this.renderer.variables.get('__route')) { | ||
let route = this.current_route; | ||
|
||
if (route && route.section != config.section) { | ||
|
@@ -792,20 +798,21 @@ Router.setMethod(function getAnchor(name, parameters, options) { | |
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 1.2.5 | ||
* @version 1.2.5 | ||
* @version 1.4.0 | ||
* | ||
* @return {Object} | ||
*/ | ||
Router.setMethod(function getRouteVariables() { | ||
|
||
const variables = this.view_render?.variables; | ||
|
||
let params, | ||
route, | ||
route = variables?.get?.('__route'), | ||
url; | ||
|
||
if (this.view_render?.variables?.__route) { | ||
route = this.view_render.variables.__route; | ||
params = this.view_render.variables.__urlparams; | ||
url = this.view_render.variables.__url; | ||
if (route) { | ||
params = variables.get('__urlparams'); | ||
url = variables.get('__url'); | ||
} else if (Blast.isBrowser) { | ||
route = alchemy.current_route; | ||
params = alchemy.current_url_params; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -701,7 +701,7 @@ RouterClass.setMethod(function use(_paths, _fnc, _options) { | |
* | ||
* @author Jelle De Loecker <[email protected]> | ||
* @since 1.1.0 | ||
* @version 1.3.0 | ||
* @version 1.4.0 | ||
* | ||
* @param {string} module_name The name of the dependency | ||
* @param {Object} options The options or single string | ||
|
@@ -744,7 +744,7 @@ RouterClass.setMethod(function serveDependencyFile(module_name, options) { | |
// Cache this file so earlier middleware can handle this from now on | ||
alchemy.getCache('files.assets').set(req.url, {path: options.path}); | ||
|
||
req.conduit.serveFile(options.path); | ||
req.conduit.serveFile(options.path, options?.serve_options); | ||
}); | ||
}); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters