Closed JuanPabloLoCoco closed 1 year ago
Thanks for this bug report! Would you mind opening a pull request where you add a (failing) unit test that shows the issue? That way we'd be able to find the issue more easily.
A good place to add a units test would be here: https://github.com/nrkno/sofie-mos-connection/blob/master/packages/connector/src/__tests__/Profile2.spec.ts#L454
Add one by copying an existing one, then run the tests with yarn test
(you might have to install (yarn
and build yarn build
first).
I'm submitting a ... [x] bug report [ ] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project
Summary On sending the following mos message:
If I want to process this mesage, in the
MosDevice.ts
on sourceStories i will get:This is because
data.roElementAction.element_source
is equal to{ text: 2, story: 2}
. And this occurs because in the function xml2js exists a logic for compressing the tags when a node has a unique long branch.In this example the child of
<story>
is<whatevet>
because it doesn't matter what is the name of the nodes between the root node and its child's.