aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ng/parse.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ng/parse.js b/src/ng/parse.js
index bd3aa048..885dc50a 100644
--- a/src/ng/parse.js
+++ b/src/ng/parse.js
@@ -785,6 +785,10 @@ Parser.prototype = {
var allConstant = true;
if (this.peekToken().text !== ']') {
do {
+ if (this.peek(']')) {
+ // Support trailing commas per ES5.1.
+ break;
+ }
var elementFn = this.expression();
elementFns.push(elementFn);
if (!elementFn.constant) {
@@ -811,6 +815,10 @@ Parser.prototype = {
var allConstant = true;
if (this.peekToken().text !== '}') {
do {
+ if (this.peek('}')) {
+ // Support trailing commas per ES5.1.
+ break;
+ }
var token = this.expect(),
key = token.string || token.text;
this.consume(':');