From a935b044cb33ea91634e64f926ead1d589570aee Mon Sep 17 00:00:00 2001 From: Stephen Sawchuk Date: Wed, 3 Dec 2014 17:03:43 -0500 Subject: [PATCH] docs: dont override inherited, but then overwritten methods --- docs/components/docs/docs.js | 10 +++++++--- lib/datastore/transaction.js | 2 -- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/components/docs/docs.js b/docs/components/docs/docs.js index 186892bffd0f..f179ba847cfe 100644 --- a/docs/components/docs/docs.js +++ b/docs/components/docs/docs.js @@ -181,6 +181,9 @@ angular function getMixIns($sce, $q, $http, version, baseUrl) { return function(data) { + var classMethodNames = data.map(function(method) { + return method.name; + }); var methodWithMixIns = data.filter(function(method) { return method.mixes.length > 0; })[0]; @@ -188,17 +191,18 @@ angular return data; } return $q - .all(getMixInMethods(methodWithMixIns)) + .all(getMixInMethods(classMethodNames, methodWithMixIns)) .then(combineMixInMethods(data)); }; - function getMixInMethods(method) { + function getMixInMethods(classMethodNames, method) { return method.mixes.map(function (module) { module = module.string.trim().replace('module:', ''); return $http.get(baseUrl + '/' + module + '.json') .then(filterDocJson($sce, version)) .then(function(mixInData) { return mixInData.filter(function(method) { - return !method.constructor; + return !method.constructor && + classMethodNames.indexOf(method.name) === -1; }); }); }); diff --git a/lib/datastore/transaction.js b/lib/datastore/transaction.js index c80b43fa3571..4e91aa7cc0d0 100644 --- a/lib/datastore/transaction.js +++ b/lib/datastore/transaction.js @@ -256,7 +256,6 @@ Transaction.prototype.commit = function(callback) { * transaction. * * @param {Key|Key[]} key - Datastore key object(s). - * @param {function} callback - The callback function. * * @example * // Delete a single entity. @@ -303,7 +302,6 @@ Transaction.prototype.delete = function(entities) { * If you provide an array of objects, you must use the explicit syntax: * `name` for the name of the property and `value` for its value. You may * also specify an `excludeFromIndexes` property, set to `true` or `false`. - * @param {function} callback - The callback function. * * @example * //-