Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sorvell committed Sep 25, 2014
1 parent 22aa097 commit 71d2041
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/declaration/polymer.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
throw 'Element name could not be inferred.';
}
}
if (getRegisteredPrototype[name]) {
if (getRegisteredPrototype(name)) {
throw 'Already registered (Polymer) prototype for element ' + name;
}
// cache the prototype
Expand Down
3 changes: 3 additions & 0 deletions test/html/element-registration.html
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@
Polymer('x-dynamic', {
dynamic: true
});

// re-registration throws
assert.throws(function() { Polymer('x-dynamic'); });
var dynamic = document.createElement('x-dynamic');
assert.equal(dynamic.dynamic, true);

Expand Down

0 comments on commit 71d2041

Please sign in to comment.