lib/modules/apostrophe-areas/lib/api.js
function hardLock(callback) {
      return self.apos.locks.lock('save-area-' + docId, { waitForSelf: true }, function(err) {
        if (err) {
          return callback(err);
        }
        hardLocked = true;
        return callback(null);
      });
    }
function hardLock(callback) {
      return self.apos.locks.lock('save-area-' + docId, { waitForSelf: true }, function(err) {
        if (err) {
          return callback(err);
        }
        hardLocked = true;
        return callback(null);
      });
    }
function hardLock ( callback ) { return self . apos . locks . lock ( 'save-area-' + docId , { waitForSelf : true } , function ( err ) { if ( err ) { return callback ( err ) ; } hardLocked = true ; return callback ( null ) ; } ) ; }
Also grab a hard lock on this document, just for the duration of the actual "load, sanitize stuff, and update" operation, to avoid a race condition if saving two areas around the same time, as can happen during drag and drop between areas
Also grab a hard lock on this document just for the duration of the actual load sanitize stuff and update operation to avoid a race condition if saving two areas around the same time as can happen during drag and drop between areas