From f8099550bd81511cd41a0ce3e4cccb11e5770a69 Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 3 Dec 2015 16:22:45 -0800 Subject: [PATCH] [Copy] #338 updated code style in CreationPolicy --- .../browse/src/creation/CreationPolicy.js | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/platform/commonUI/browse/src/creation/CreationPolicy.js b/platform/commonUI/browse/src/creation/CreationPolicy.js index 0ccf82d907..28749e711f 100644 --- a/platform/commonUI/browse/src/creation/CreationPolicy.js +++ b/platform/commonUI/browse/src/creation/CreationPolicy.js @@ -27,23 +27,19 @@ define( "use strict"; /** - * A policy for determining whether objects of a certain type can be + * A policy for determining whether objects of a given type can be * created. - * @returns {{allow: Function}} * @constructor + * @implements {Policy} + * @memberof platform/commonUI/browse */ function CreationPolicy() { - return { - /** - * Only allow creation of object types that have the - * Creation capability - */ - allow: function (type) { - return type.hasFeature("creation"); - } - }; } + CreationPolicy.prototype.allow = function (type) { + return type.hasFeature("creation"); + }; + return CreationPolicy; } ); \ No newline at end of file