Skip to content

Commit

Permalink
account for literal values as well as normal values when using 'm-mod…
Browse files Browse the repository at this point in the history
…el' with literal values (fixes #60)
  • Loading branch information
kbrsh committed Jul 10, 2017
1 parent e6c3768 commit 11ff0de
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion dist/moon.js
Original file line number Diff line number Diff line change
Expand Up @@ -2277,7 +2277,13 @@

if(radio === true) {
var valueAttr = attrs.value;
var valueAttrValue = valueAttr === undefined ? "null" : ("\"" + (compileTemplate(valueAttr.value, dependencies, true)) + "\"");
var literalValueAttr = null;
var valueAttrValue = "null";
if(valueAttr !== undefined) {
valueAttrValue = "\"" + (compileTemplate(valueAttr.value, dependencies, true)) + "\"";
} else if((literalValueAttr = attrs["m-literal:value"])) {
valueAttrValue = "" + (compileTemplate(literalValueAttr.value, dependencies, true));
}
domSetter = domSetter + " === " + valueAttrValue;
keypathSetter = valueAttrValue;
} else {
Expand Down
Loading

0 comments on commit 11ff0de

Please sign in to comment.