Skip to content

Commit 98d8908

Browse files
committed
Merge pull request #1577 from Polymer/literal-args-comma-fix
Literal args comma fix
2 parents 9b0bdf5 + 40a9578 commit 98d8908

File tree

7 files changed

+326
-222
lines changed

7 files changed

+326
-222
lines changed

polymer.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<link rel="import" href="src/standard/events.html">
1515
<link rel="import" href="src/standard/gestures.html">
1616
<link rel="import" href="src/standard/utils.html">
17-
<link rel="import" href="src/standard/effects.html">
17+
<link rel="import" href="src/standard/effectBuilder.html">
1818
<link rel="import" href="src/standard/configure.html">
1919
<link rel="import" href="src/standard/notify-path.html">
2020
<link rel="import" href="src/standard/resolveUrl.html">

src/lib/bind/effects.html

+8-3
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,21 @@
8686
for (var i=0, l=args.length; i<l; i++) {
8787
var arg = args[i];
8888
var name = arg.name;
89-
var v = arg.structured ?
90-
Polymer.Base.get(name, model) : model[name];
89+
if (arg.literal) {
90+
v = arg.value;
91+
} else if (arg.structured) {
92+
v = Polymer.Base.get(name, model);
93+
} else {
94+
v = model[name];
95+
}
9196
if (args.length > 1 && v === undefined) {
9297
return;
9398
}
9499
if (arg.wildcard) {
95100
// Only send the actual path changed info if the change that
96101
// caused the observer to run matched the wildcard
97102
var baseChanged = (name.indexOf(path + '.') === 0);
98-
var matches = (effect.arg.name.indexOf(name) === 0 && !baseChanged);
103+
var matches = (effect.trigger.name.indexOf(name) === 0 && !baseChanged);
99104
values[i] = {
100105
path: matches ? path : name,
101106
value: matches ? value : v,

src/standard/configure.html

+5
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@
6767
// configure: returns user supplied default property values
6868
// combines with _config to create final property values
6969
_configure: function() {
70+
// some annotation data needs to be handed from host to client
71+
// e.g. hand template content stored in notes to children as part of
72+
// configure flow so templates have their content at ready time
7073
this._configureAnnotationReferences();
7174
// get individual default values from property configs
7275
var config = {};
@@ -132,6 +135,8 @@
132135

133136
// Override polymer-mini thunk
134137
_afterClientsReady: function() {
138+
// process static effects, e.g. computations that have only literal arguments
139+
this._executeStaticEffects();
135140
this._applyConfig(this._config);
136141
this._flushHandlers();
137142
},

0 commit comments

Comments
 (0)