diff --git a/jupyterdrive/gdrive/drive-contents.js b/jupyterdrive/gdrive/drive-contents.js
index <HASH>..<HASH> 100644
--- a/jupyterdrive/gdrive/drive-contents.js
+++ b/jupyterdrive/gdrive/drive-contents.js
@@ -105,7 +105,10 @@ define(function(require) {
     };
 
     Contents.prototype.delete = function(path) {
-        return drive_utils.get_id_for_path(path, drive_utils.FileType.FILE)
+        return gapi_utils.gapi_ready
+        .then(function() {
+            return drive_utils.get_id_for_path(path, drive_utils.FileType.FILE);
+        })
         .then(function(file_id){
             return gapi_utils.execute(gapi.client.drive.files.delete({'fileId': file_id}));
         });
Adds gapi_utils.gapi_ready guard to Contents.delete

gapi_utils.gapi_ready is a promise that is fullfilled when the Google API has loaded.  This promise should be used to guard any calls to gapi_util or drive_util functions, to prevent calls to the Google API before the API has loaded.