Skip to content

Commit

Permalink
* xover.Source.fetch - bug fixed for null values in the json evaluation
Browse files Browse the repository at this point in the history
* section_renderer_handler - added stylesheet * condition in order to use document's stylesheets
  • Loading branch information
uriel-online committed Jan 14, 2024
1 parent c3c72d0 commit 7070aed
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xo.js
Original file line number Diff line number Diff line change
Expand Up @@ -2475,7 +2475,9 @@ xover.Source = function (tag) {
while (!response && sources.length) {
let evaluate_json = (value) => {
let result;
if ([].constructor === value.constructor) {
if (value == null) {
result = value
} else if ([].constructor === value.constructor) {
result = [];
for (let item of value) {
result.push(evaluate_json(item))
Expand Down Expand Up @@ -11173,7 +11175,7 @@ xover.modernize = async function (targetWindow) {
await source_document.ready
}
}
stylesheets = stylesheet && [stylesheet] || source_document && source_document.getStylesheets() || [];
stylesheets = stylesheet && stylesheet !== '*' && [stylesheet] || stylesheet == '*' && source_document && source_document.getStylesheets() || [];
if (stylesheets.length) {
stylesheets = stylesheets.map(stylesheet => typeof (stylesheet) === 'string' && { type: 'text/xsl', href: stylesheet, target: self, store: (target_store || {}).tag } || stylesheet instanceof ProcessingInstruction && xover.json.fromAttributes(stylesheet.data) || null).filter(stylesheet => stylesheet);
for (let stylesheet of stylesheets) {
Expand Down

0 comments on commit 7070aed

Please sign in to comment.