DEV: Fix random typos (#26881)

This commit is contained in:
Jarek Radosz 2024-05-06 20:52:48 +02:00 committed by GitHub
parent d8b1c3c807
commit 79870d3a1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 16 additions and 16 deletions

View File

@ -30,7 +30,7 @@ export default class DAG {
/**
* Adds a key/value pair to the map. Can optionally specify before/after position requirements.
*
* @param {string} key The key of the item to be added. Can be referenced by other member's postition parameters.
* @param {string} key The key of the item to be added. Can be referenced by other member's position parameters.
* @param {any} value
* @param {Object} position
* @param {string | string[]} position.before A key or array of keys of items which should appear before this one.

View File

@ -585,7 +585,7 @@ export default class TopicTrackingState extends EmberObject {
filterFn = isNewOrUnread;
break;
default:
throw new Error(`Unkown filter type ${type}`);
throw new Error(`Unknown filter type ${type}`);
}
return Array.from(this.states.values()).filter((topic) => {

View File

@ -1580,7 +1580,7 @@ export default class ComposerService extends Service {
return this.keyValueStore.getItem("composerHeight");
}
// The two custom properties below can be overriden by themes/plugins to set different default composer heights.
// The two custom properties below can be overridden by themes/plugins to set different default composer heights.
if (this.model.action === "reply") {
return "var(--reply-composer-height, 300px)";
} else {

View File

@ -2148,7 +2148,7 @@ class UsersController < ApplicationController
end
def deprecate_modify_user_params_method
# only issue a deprecation warning if the method is overriden somewhere
# only issue a deprecation warning if the method is overridden somewhere
if method(:modify_user_params).source_location[0] !=
"#{Rails.root}/app/controllers/users_controller.rb"
Discourse.deprecate(

View File

@ -47,7 +47,7 @@ RSpec.describe Chat::Api::ChannelMessagesController do
end
end
context "when channnel doesnt exist" do
context "when channel doesnt exist" do
it "returns a 404" do
get "/chat/api/channels/-999/messages"

View File

@ -106,7 +106,7 @@ RSpec.describe Chat::TrashMessage do
expect(membership_3.reload.last_read_message_id).to eq(other_message.id)
end
it "updates the tracking to nil when there are no other messages left in the channnel" do
it "updates the tracking to nil when there are no other messages left in the channel" do
membership_1 =
Fabricate(
:user_chat_channel_membership,

View File

@ -34,7 +34,7 @@ module("Discourse Lazy Videos | Component | lazy-video", function (hooks) {
assert.dom(".icon.youtube-icon").exists();
});
test("uses tthe dominant color from the dom", async function (assert) {
test("uses the dominant color from the dom", async function (assert) {
await render(hbs`<LazyVideo @videoAttributes={{this.attributes}} />`);
assert

View File

@ -320,10 +320,10 @@ RSpec.describe DiscourseWebauthn::AuthenticationService do
# simulate missing user verification in the key data
# by setting third bit to 0
flags = "10000010" # correct flag sequence is "10100010"
overriden_auth_data = service.send(:auth_data)
overriden_auth_data[32] = [flags].pack("b*")
overridden_auth_data = service.send(:auth_data)
overridden_auth_data[32] = [flags].pack("b*")
service.instance_variable_set(:@auth_data, overriden_auth_data)
service.instance_variable_set(:@auth_data, overridden_auth_data)
expect { service.authenticate_security_key }.to raise_error(
DiscourseWebauthn::UserVerificationError,

View File

@ -157,10 +157,10 @@ RSpec.describe DiscourseWebauthn::RegistrationService do
it "raises a UserPresenceError" do
# simulate missing user presence by flipping first bit to 0
flags = "00000010"
overridenAuthData = service.send(:auth_data)
overridenAuthData[32] = [flags].pack("b*")
overriddenAuthData = service.send(:auth_data)
overriddenAuthData[32] = [flags].pack("b*")
service.instance_variable_set(:@auth_data, overridenAuthData)
service.instance_variable_set(:@auth_data, overriddenAuthData)
expect { service.register_security_key }.to raise_error(
DiscourseWebauthn::UserPresenceError,
@ -213,10 +213,10 @@ RSpec.describe DiscourseWebauthn::RegistrationService do
it "raises a UserVerificationError" do
# simulate missing user verification by flipping third bit to 0
flags = "10000010" # correct flag sequence is "10100010"
overriden_auth_data = service.send(:auth_data)
overriden_auth_data[32] = [flags].pack("b*")
overridden_auth_data = service.send(:auth_data)
overridden_auth_data[32] = [flags].pack("b*")
service.instance_variable_set(:@auth_data, overriden_auth_data)
service.instance_variable_set(:@auth_data, overridden_auth_data)
expect { service.register_security_key }.to raise_error(
DiscourseWebauthn::UserVerificationError,