fix misspellings in comments and tests (#8946)

* fix misspellings in comments and tests

* revert change in docs/js/react-dom.js
This commit is contained in:
Sean Gransee 2017-02-13 16:01:54 -06:00 committed by Brandon Dail
parent 890d52bafc
commit c16ec5df13
12 changed files with 20 additions and 19 deletions

View File

@ -11,7 +11,7 @@
$side: nth($pos, 2);
@if $length == 2 { // eg. to top
// Swap for backwards compatability
// Swap for backwards compatibility
$degree: _position-flipper(nth($pos, 2));
}
@else if $length == 3 { // eg. to top left
@ -38,7 +38,7 @@
$spec: to $side $corner;
}
@else if $length == 1 {
// Swap for backwards compatability
// Swap for backwards compatibility
@if $type == string {
$degree: $pos;
$spec: to _position-flipper($pos);

View File

@ -38,6 +38,6 @@ document.write('<script src="' + REACT_PATH + '"></script>');
if (version === 'local' || parseFloat(version, 10) > 0.13) {
document.write('<script src="' + DOM_PATH + '"></script>');
} else {
// Aliasing React to ReactDOM for compatability.
// Aliasing React to ReactDOM for compatibility.
document.write('<script>ReactDOM = React</script>');
}

View File

@ -38,7 +38,7 @@ describe('invertObject', () => {
});
});
it('should perserve the original order', () => {
it('should preserve the original order', () => {
expect(Object.keys(invertObject({
a: '3',
b: '4',

View File

@ -32,7 +32,7 @@ scripts/error-codes/__tests__/invertObject-test.js
* should return an empty object for an empty input
* should invert key-values
* should take the last value when there're duplications in vals
* should perserve the original order
* should preserve the original order
src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js
* provides a default shouldComponentUpdate implementation

View File

@ -479,7 +479,7 @@ var ReactDOMFiberComponent = {
} else if (props.is) {
domElement = ownerDocument.createElement(type, props.is);
} else {
// Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.
// Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
// See discussion in https://github.com/facebook/react/pull/6896
// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
domElement = ownerDocument.createElement(type);

View File

@ -578,7 +578,7 @@ ReactDOMComponent.Mixin = {
} else if (props.is) {
el = ownerDocument.createElement(type, props.is);
} else {
// Separate else branch instead of using `props.is || undefined` above becuase of a Firefox bug.
// Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
// See discussion in https://github.com/facebook/react/pull/6896
// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
el = ownerDocument.createElement(type);

View File

@ -332,7 +332,7 @@ function diffProperties(
}
// An explicit value of undefined is treated as a null because it overrides
// any other preceeding value.
// any other preceding value.
if (typeof nextProp === 'undefined') {
nextProp = (null : any);
if (typeof prevProp === 'undefined') {

View File

@ -189,7 +189,7 @@ var ReactNativeEventEmitter = {
if (__DEV__) {
warning(
false,
'A view is reporting that a touch occured on tag zero.'
'A view is reporting that a touch occurred on tag zero.'
);
}
} else {

View File

@ -231,7 +231,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
// Before we start any new work, let's make sure that we have a fresh
// stack to work from.
// TODO: This call is burried a bit too deep. It would be nice to have
// TODO: This call is buried a bit too deep. It would be nice to have
// a single point which happens right before any new work and
// unfortunately this is it.
resetContextStack();
@ -629,7 +629,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
}
if (nextUnitOfWork === null) {
// If performUnitOfWork returns null, that means we just comitted
// If performUnitOfWork returns null, that means we just committed
// a root. Normally we'd need to clear any errors that were scheduled
// during the commit phase. But we're already clearing errors, so
// we can continue.
@ -696,7 +696,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
if (nextUnitOfWork === null) {
nextUnitOfWork = findNextUnitOfWork();
// performUnitOfWork returned null, which means we just comitted a
// performUnitOfWork returned null, which means we just committed a
// root. Clear any errors that were scheduled during the commit phase.
clearErrors();
}
@ -746,8 +746,9 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
} catch (error) {
// We caught an error during either the begin or complete phases.
const failedWork = nextUnitOfWork;
if (failedWork !== null) {
// Reset the priority context to its value before reconcilation.
// Reset the priority context to its value before reconciliation.
priorityContext = priorityContextBeforeReconciliation;
// "Capture" the error by finding the nearest boundary. If there is no

View File

@ -210,7 +210,7 @@ function findInsertionPosition(queue, update) : Update | null {
// To solve this, in the case where the incoming update needs to be inserted
// into two different positions, we'll make a clone of the update and insert
// each copy into a separate queue. This forks the list while maintaining a
// persistent stucture, because the update that is added to the work-in-progress
// persistent structure, because the update that is added to the work-in-progress
// is always added to the front of the list.
//
// However, if incoming update is inserted into the same position of both lists,

View File

@ -502,7 +502,7 @@ describe('ReactIncremental', () => {
ops = [];
// Interupt the rendering with a quick update. This should not touch the
// Interrupt the rendering with a quick update. This should not touch the
// middle content.
ReactNoop.render(<Foo text="foo" text2="bar" step={0} />);
ReactNoop.flush();
@ -528,7 +528,7 @@ describe('ReactIncremental', () => {
ops = [];
// but we'll interupt it to render some higher priority work.
// but we'll interrupt it to render some higher priority work.
// The middle content will bailout so it remains untouched.
ReactNoop.render(<Foo text="foo" text2="bar" step={1} />);
ReactNoop.flushDeferredPri(30);
@ -694,7 +694,7 @@ describe('ReactIncremental', () => {
ops = [];
// but we'll interupt it to render some higher priority work.
// but we'll interrupt it to render some higher priority work.
// The middle content will bailout so it remains untouched.
ReactNoop.render(<Foo text="foo" step={1} />);
ReactNoop.flushDeferredPri(30);

View File

@ -406,7 +406,7 @@ describe('ReactIncrementalSideEffects', () => {
div(div(span('Hi'), span('foo'))),
]);
// The first Bar has already completed its update but we'll interupt it to
// The first Bar has already completed its update but we'll interrupt it to
// render some higher priority work. The middle content will bailout so
// it remains untouched which means that it should reuse it next time.
ReactNoop.render(<Foo text="foo" step={1} />);
@ -472,7 +472,7 @@ describe('ReactIncrementalSideEffects', () => {
div(div(span('Hi'), span('foo'))),
]);
// The first Bar has already completed its update but we'll interupt it to
// The first Bar has already completed its update but we'll interrupt it to
// render some higher priority work. The middle content will bailout so
// it remains untouched which means that it should reuse it next time.
ReactNoop.render(<Foo text="foo" step={1} />);