Skip to content

Commit

Permalink
Fix typos (#3771)
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor authored Oct 2, 2023
1 parent e0cc694 commit e36f48c
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/alpinejs/src/directives/x-model.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ directive('model', (el, { modifiers, expression }, { effect, cleanup }) => {
cleanup(() => removeResetListener())
}

// Allow programmatic overiding of x-model.
// Allow programmatic overriding of x-model.
el._x_model = {
get() {
return getValue()
Expand Down
2 changes: 1 addition & 1 deletion packages/alpinejs/src/evaluator.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function generateFunctionFromString(expression, el) {
let AsyncFunction = Object.getPrototypeOf(async function(){}).constructor

// Some expressions that are useful in Alpine are not valid as the right side of an expression.
// Here we'll detect if the expression isn't valid for an assignement and wrap it in a self-
// Here we'll detect if the expression isn't valid for an assignment and wrap it in a self-
// calling function so that we don't throw an error AND a "return" statement can b e used.
let rightSideSafeExpression = 0
// Support expressions starting with "if" statements like: "if (...) doSomething()"
Expand Down
4 changes: 2 additions & 2 deletions packages/alpinejs/src/mutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ function onMutate(mutations) {
// New attribute.
if (el.hasAttribute(name) && oldValue === null) {
add()
// Changed atttribute.
// Changed attribute.
} else if (el.hasAttribute(name)) {
remove()
add()
// Removed atttribute.
// Removed attribute.
} else {
remove()
}
Expand Down
4 changes: 2 additions & 2 deletions packages/intersect/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default function (Alpine) {

let options = {
rootMargin: getRootMargin(modifiers),
threshold: getThreshhold(modifiers),
threshold: getThreshold(modifiers),
}

let observer = new IntersectionObserver(entries => {
Expand All @@ -26,7 +26,7 @@ export default function (Alpine) {
})
}

function getThreshhold(modifiers) {
function getThreshold(modifiers) {
if (modifiers.includes('full')) return 0.99
if (modifiers.includes('half')) return 0.5
if (! modifiers.includes('threshold')) return 0
Expand Down
2 changes: 1 addition & 1 deletion packages/morph/src/morph.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export function morph(from, toHtml, options) {
currentFrom = currentFromNext
}

// Cleanup extra froms.
// Cleanup extra forms.
let removals = []

// We need to collect the "removals" first before actually
Expand Down
2 changes: 1 addition & 1 deletion packages/morph/src/old_morph.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export async function morph(from, toHtml, options) {
currentFrom = currentFromNext
}

// Cleanup extra froms.
// Cleanup extra forms.
let removals = []

// We need to collect the "removals" first before actually
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/list-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export function generateContext(Alpine, multiple, orientation, activateSelectedO
* Return true if the latest active element was activated
* by the user (i.e. using the arrow keys) and false if was
* activated automatically by alpine (i.e. first element automatically
* activeted after filtering the list)
* activated after filtering the list)
*/
wasActivatedByKeyPress() {return this.activatedByKeyPress},

Expand Down Expand Up @@ -204,7 +204,7 @@ export function generateContext(Alpine, multiple, orientation, activateSelectedO
},

/**
* Handle active key traveral...
* Handle active key traversal...
*/
nextKey() {
if (! this.activeKey) return
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/integration/plugins/mask.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ test('$money with different thousands separator',
}
);

test('$money works with permenant inserted at beginning',
test('$money works with permanent inserted at beginning',
[html`<input x-data x-mask:dynamic="$money">`],
({ get }) => {
get('input').type('40.00').should(haveValue('40.00'))
Expand Down
2 changes: 1 addition & 1 deletion tests/cypress/integration/plugins/ui/combobox.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ test('"name" prop',
},
);

test('Preserves currenty active keyboard selection while options change from searching even if there\'s a selected option in the filtered results',
test('Preserves currently active keyboard selection while options change from searching even if there\'s a selected option in the filtered results',
[html`
<div
x-data="{
Expand Down

0 comments on commit e36f48c

Please sign in to comment.