Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #3771

Merged
merged 1 commit into from Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/alpinejs/src/directives/x-model.js
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
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
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
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
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
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
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
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
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