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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to