Skip to content

Commit

Permalink
fixes for users of Polymer.Class
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Jan 31, 2017
1 parent 13f36c7 commit 0f53bef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/lib/polymer-bootstrap.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@
}

Polymer.Class = function(prototype) {
/*
factoryImpl is required for a class constructor to be returned
Because users of Polymer.Class always expect a class constructor,
always provide a factoryImpl function
*/
if (!prototype.factoryImpl) {
prototype.factoryImpl = function() {};
}
return desugar(prototype).constructor;
}

Expand Down
3 changes: 2 additions & 1 deletion src/micro/properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@
* @memberof! feature: properties
*/
(function() {
var propertiesDesc = {configurable: true, writable: true};
var propertiesDesc = {configurable: true, writable: true, enumerable: true,
value: {}};
Polymer.BaseDescriptors.properties = propertiesDesc;
Object.defineProperty(Polymer.Base, 'properties', propertiesDesc);
})();
Expand Down

0 comments on commit 0f53bef

Please sign in to comment.