Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
fixed: xforms-version check relies on specific namespace prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnR committed Aug 3, 2020
1 parent fe80728 commit 05cbaa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
##### Changed
- Let cookie access attempt fail silently in context where document.cookie is not accessible and throws an exception.

##### Fixed
- Xforms-version check relies on specific namespace prefix.

[5.16.4] - 2020-07-23
----------------------
##### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/js/form-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ FormModel.prototype.init = function() {
// In the future, if there are more use cases for odk:xforms-version, we'll probably have to use a semver-parser
// to do a comparison. In this case, the presence of the attribute is sufficient, as we know no older versions
// than odk:xforms-version="1.0.0" exist. Previous versions had no number.
this.noRepeatRefErrorExpected = this.evaluate( '/model/@odk:xforms-version', 'boolean', null, null, true );
this.noRepeatRefErrorExpected = this.evaluate( `/model/@${this.getNamespacePrefix( ODK_XFORMS_NS )}:xforms-version`, 'boolean', null, null, true );

// Check if instanceID is present
if ( !this.getMetaNode( 'instanceID' ).getElement() ) {
Expand Down

0 comments on commit 05cbaa7

Please sign in to comment.