Skip to content

Commit

Permalink
typo fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Ofigelov committed Oct 30, 2020
1 parent f118fa1 commit 730d6d3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class CollapsedComponent extends DcBaseComponent {
static requiredRefs = ['button', 'content'];

init = () => {
console.log('CollapsedComponent was instantiate on the element', this.element);
console.log('CollapsedComponent was instantiated on the element', this.element);
console.log('Options', this.options);
console.log('Refs', this.refs);

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h2>Simple example</h2>
static requiredRefs = ['button', 'content'];

init = () => {
console.log('CollapsedComponent was instantiate on the element', this.element);
console.log('CollapsedComponent was instantiated on the element', this.element);
console.log('Options', this.options);
console.log('Refs', this.refs);

Expand Down
2 changes: 1 addition & 1 deletion src/dc-base-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class DcBaseComponent {
refs.forEach(name => {
if (!this.refs[name]) {
throw new Error(
`required ref "${name}" is not founded in ${namespace}`
`required ref "${name}" not found in ${namespace}`
);
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/dc-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class DcFactory {
/**
* Starts the factory on a given root: finds and creates all registered components within the root
* @param {HTMLElement} root
* @param {boolean} withLazy - Whether or not initialize component which marked as lazy
* @param {boolean} withLazy - Whether or not initialize component which is marked as lazy
*/
public init: (root?: HTMLElement, withLazy?: boolean) => void = (root = document.documentElement, withLazy = true) => {
this._registeredComponents.forEach((rComponent) => {
Expand Down Expand Up @@ -130,7 +130,7 @@ class DcFactory {
}
}

// if component is lazy but we should not instantiate it according withLazy = false
// if component is lazy but we should not instantiate it according to withLazy = false
// we need to mark this component and wait until withLazy = true
if (!withLazy && isElementWithinLazyParent(element)) {
this._setState(element, rComponent, STATE_LAZY_WAITING);
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Return sting in camelCase notation, e.g. some-name becomes someName
* Return string in camelCase notation, e.g. some-name becomes someName
* @param {string} str
* @return {string}
*/
Expand Down

0 comments on commit 730d6d3

Please sign in to comment.