Skip to content

Conversation

the-matrixneo
Copy link
Contributor

@the-matrixneo the-matrixneo commented Oct 2, 2025

This PR addresses a bug where plain objects with a primitive .value property { value: 0 }) were incorrectly processed by the rml parser.
these effects were considered

  • rendering as HTML content <div>${expr}</div>.
  • when rendered inside an element's attribute <input value="${expr}">.

The Fix:

  • new logical check has been added to the beginning of the data sink processing logic in the main rml function.
  • this check now correctly identifies these "value-wrapper" objects and extracts their primitive value.

Please add hacktoberfest label

Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

}
}
}
// Future / Object Sink
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change block seems redundant. Everything works well with the other change alone.
Let's get rid of this, then we are good, by the looks of it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

completed!

expect(template).toEqual(`<input value="0">`);
});
});
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are great, could you please move them inside the BehaviorSubject block?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants