You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/03/13 08:04:34 UTC

[GitHub] garrensmith commented on a change in pull request #1065: Remove JQuery uses from documents addon

garrensmith commented on a change in pull request #1065: Remove JQuery uses from documents addon
URL: https://github.com/apache/couchdb-fauxton/pull/1065#discussion_r174040337
 
 

 ##########
 File path: app/addons/documents/resources.js
 ##########
 @@ -85,18 +86,15 @@ Documents.DdocInfo = FauxtonAPI.Model.extend({
 
 Documents.NewDoc = Documents.Doc.extend({
   fetch: function () {
-    var uuid = new Documents.UUID();
-    var deferred = this.deferred = $.Deferred();
-    var that = this;
-
-    uuid.fetch().done(function () {
-      that.set("_id", uuid.next());
-      deferred.resolve();
+    const uuid = new Documents.UUID();
+    const promise = new FauxtonAPI.Promise((resolve) => {
+      uuid.fetch().done(() => {
 
 Review comment:
   Ideally, we need the UUID generation to be extracted out of the model and just be a nice function.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services