From 24448c750456e3fbde2c1b1205ecf6faac8485af Mon Sep 17 00:00:00 2001 From: Necmettin Karakaya Date: Sun, 19 Jul 2020 00:33:27 +0800 Subject: [PATCH] fix: common misspelling errors https://github.com/outline/outline/blob/master/app/scenes/UserDelete.js#L40: corrected "destory" to "destroy" https://github.com/outline/outline/blob/master/app/components/ScrollToTop.js#L16: corrected "postion" to "position" https://github.com/outline/outline/blob/master/server/policies/document.js#L11: corrected "existance" to "existence" https://github.com/outline/outline/blob/master/server/policies/document.js#L23: corrected "existance" to "existence" https://github.com/outline/outline/blob/master/server/models/Document.js#L493: corrected "permanantly" to "permanently" https://github.com/outline/outline/blob/master/shared/utils/domains.js#L12: corrected "unneccessarily" to "unnecessarily" https://github.com/outline/outline/blob/master/server/api/documents.js#L34: corrected "compatablity" to "compatibility" --- app/components/ScrollToTop.js | 2 +- app/scenes/UserDelete.js | 2 +- server/api/documents.js | 2 +- server/models/Document.js | 2 +- server/policies/document.js | 4 ++-- shared/utils/domains.js | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/components/ScrollToTop.js b/app/components/ScrollToTop.js index 115159e0d..1129a3410 100644 --- a/app/components/ScrollToTop.js +++ b/app/components/ScrollToTop.js @@ -13,7 +13,7 @@ class ScrollToTop extends React.Component { componentDidUpdate(prevProps) { if (this.props.location.pathname === prevProps.location.pathname) return; - // exception for when entering or exiting document edit, scroll postion should not reset + // exception for when entering or exiting document edit, scroll position should not reset if ( this.props.location.pathname.match(/\/edit\/?$/) || prevProps.location.pathname.match(/\/edit\/?$/) diff --git a/app/scenes/UserDelete.js b/app/scenes/UserDelete.js index d09b49ccd..b9a93417b 100644 --- a/app/scenes/UserDelete.js +++ b/app/scenes/UserDelete.js @@ -37,7 +37,7 @@ class UserDelete extends React.Component {
- Are you sure? Deleting your account will destory identifying data + Are you sure? Deleting your account will destroy identifying data associated with your user and cannot be undone. You will be immediately logged out of Outline and all your API tokens will be revoked. diff --git a/server/api/documents.js b/server/api/documents.js index 1c52b487f..9289fee40 100644 --- a/server/api/documents.js +++ b/server/api/documents.js @@ -31,7 +31,7 @@ const router = new Router(); router.post("documents.list", auth(), pagination(), async ctx => { const { sort = "updatedAt", backlinkDocumentId, parentDocumentId } = ctx.body; - // collection and user are here for backwards compatablity + // collection and user are here for backwards compatibility const collectionId = ctx.body.collectionId || ctx.body.collection; const createdById = ctx.body.userId || ctx.body.user; let direction = ctx.body.direction; diff --git a/server/models/Document.js b/server/models/Document.js index 7dcee840e..f2330c24f 100644 --- a/server/models/Document.js +++ b/server/models/Document.js @@ -490,7 +490,7 @@ Document.prototype.migrateVersion = function() { }; // Note: This method marks the document and it's children as deleted -// in the database, it does not permanantly delete them OR remove +// in the database, it does not permanently delete them OR remove // from the collection structure. Document.prototype.deleteWithChildren = async function(options) { // Helper to destroy all child documents for a document diff --git a/server/policies/document.js b/server/policies/document.js index fb5578eca..5b912c4b4 100644 --- a/server/policies/document.js +++ b/server/policies/document.js @@ -8,7 +8,7 @@ const { allow, cannot } = policy; allow(User, "create", Document); allow(User, ["read", "download"], Document, (user, document) => { - // existance of collection option is not required here to account for share tokens + // existence of collection option is not required here to account for share tokens if (document.collection && cannot(user, "read", document.collection)) { return false; } @@ -20,7 +20,7 @@ allow(User, ["share"], Document, (user, document) => { if (document.archivedAt) return false; if (document.deletedAt) return false; - // existance of collection option is not required here to account for share tokens + // existence of collection option is not required here to account for share tokens if (document.collection && cannot(user, "read", document.collection)) { return false; } diff --git a/shared/utils/domains.js b/shared/utils/domains.js index f8d18bcbb..7ef14ba2a 100644 --- a/shared/utils/domains.js +++ b/shared/utils/domains.js @@ -9,7 +9,7 @@ type Domain = { // we originally used the parse-domain npm module however this includes // a large list of possible TLD's which increase the size of the bundle -// unneccessarily for our usecase of trusted input. +// unnecessarily for our usecase of trusted input. export function parseDomain(url: string): ?Domain { if (typeof url !== "string") return null; if (url === "") return null;