mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
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:
parent
890d52bafc
commit
c16ec5df13
|
|
@ -11,7 +11,7 @@
|
||||||
$side: nth($pos, 2);
|
$side: nth($pos, 2);
|
||||||
|
|
||||||
@if $length == 2 { // eg. to top
|
@if $length == 2 { // eg. to top
|
||||||
// Swap for backwards compatability
|
// Swap for backwards compatibility
|
||||||
$degree: _position-flipper(nth($pos, 2));
|
$degree: _position-flipper(nth($pos, 2));
|
||||||
}
|
}
|
||||||
@else if $length == 3 { // eg. to top left
|
@else if $length == 3 { // eg. to top left
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
$spec: to $side $corner;
|
$spec: to $side $corner;
|
||||||
}
|
}
|
||||||
@else if $length == 1 {
|
@else if $length == 1 {
|
||||||
// Swap for backwards compatability
|
// Swap for backwards compatibility
|
||||||
@if $type == string {
|
@if $type == string {
|
||||||
$degree: $pos;
|
$degree: $pos;
|
||||||
$spec: to _position-flipper($pos);
|
$spec: to _position-flipper($pos);
|
||||||
|
|
|
||||||
2
fixtures/dom/public/react-loader.js
vendored
2
fixtures/dom/public/react-loader.js
vendored
|
|
@ -38,6 +38,6 @@ document.write('<script src="' + REACT_PATH + '"></script>');
|
||||||
if (version === 'local' || parseFloat(version, 10) > 0.13) {
|
if (version === 'local' || parseFloat(version, 10) > 0.13) {
|
||||||
document.write('<script src="' + DOM_PATH + '"></script>');
|
document.write('<script src="' + DOM_PATH + '"></script>');
|
||||||
} else {
|
} else {
|
||||||
// Aliasing React to ReactDOM for compatability.
|
// Aliasing React to ReactDOM for compatibility.
|
||||||
document.write('<script>ReactDOM = React</script>');
|
document.write('<script>ReactDOM = React</script>');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ describe('invertObject', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should perserve the original order', () => {
|
it('should preserve the original order', () => {
|
||||||
expect(Object.keys(invertObject({
|
expect(Object.keys(invertObject({
|
||||||
a: '3',
|
a: '3',
|
||||||
b: '4',
|
b: '4',
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ scripts/error-codes/__tests__/invertObject-test.js
|
||||||
* should return an empty object for an empty input
|
* should return an empty object for an empty input
|
||||||
* should invert key-values
|
* should invert key-values
|
||||||
* should take the last value when there're duplications in vals
|
* 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
|
src/addons/__tests__/ReactComponentWithPureRenderMixin-test.js
|
||||||
* provides a default shouldComponentUpdate implementation
|
* provides a default shouldComponentUpdate implementation
|
||||||
|
|
|
||||||
|
|
@ -479,7 +479,7 @@ var ReactDOMFiberComponent = {
|
||||||
} else if (props.is) {
|
} else if (props.is) {
|
||||||
domElement = ownerDocument.createElement(type, props.is);
|
domElement = ownerDocument.createElement(type, props.is);
|
||||||
} else {
|
} 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
|
// See discussion in https://github.com/facebook/react/pull/6896
|
||||||
// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
|
// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
|
||||||
domElement = ownerDocument.createElement(type);
|
domElement = ownerDocument.createElement(type);
|
||||||
|
|
|
||||||
|
|
@ -578,7 +578,7 @@ ReactDOMComponent.Mixin = {
|
||||||
} else if (props.is) {
|
} else if (props.is) {
|
||||||
el = ownerDocument.createElement(type, props.is);
|
el = ownerDocument.createElement(type, props.is);
|
||||||
} else {
|
} 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
|
// See discussion in https://github.com/facebook/react/pull/6896
|
||||||
// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
|
// and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
|
||||||
el = ownerDocument.createElement(type);
|
el = ownerDocument.createElement(type);
|
||||||
|
|
|
||||||
|
|
@ -332,7 +332,7 @@ function diffProperties(
|
||||||
}
|
}
|
||||||
|
|
||||||
// An explicit value of undefined is treated as a null because it overrides
|
// 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') {
|
if (typeof nextProp === 'undefined') {
|
||||||
nextProp = (null : any);
|
nextProp = (null : any);
|
||||||
if (typeof prevProp === 'undefined') {
|
if (typeof prevProp === 'undefined') {
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,7 @@ var ReactNativeEventEmitter = {
|
||||||
if (__DEV__) {
|
if (__DEV__) {
|
||||||
warning(
|
warning(
|
||||||
false,
|
false,
|
||||||
'A view is reporting that a touch occured on tag zero.'
|
'A view is reporting that a touch occurred on tag zero.'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -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
|
// Before we start any new work, let's make sure that we have a fresh
|
||||||
// stack to work from.
|
// 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
|
// a single point which happens right before any new work and
|
||||||
// unfortunately this is it.
|
// unfortunately this is it.
|
||||||
resetContextStack();
|
resetContextStack();
|
||||||
|
|
@ -629,7 +629,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
|
||||||
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
|
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
|
||||||
}
|
}
|
||||||
if (nextUnitOfWork === null) {
|
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
|
// a root. Normally we'd need to clear any errors that were scheduled
|
||||||
// during the commit phase. But we're already clearing errors, so
|
// during the commit phase. But we're already clearing errors, so
|
||||||
// we can continue.
|
// 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);
|
nextUnitOfWork = performUnitOfWork(nextUnitOfWork);
|
||||||
if (nextUnitOfWork === null) {
|
if (nextUnitOfWork === null) {
|
||||||
nextUnitOfWork = findNextUnitOfWork();
|
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.
|
// root. Clear any errors that were scheduled during the commit phase.
|
||||||
clearErrors();
|
clearErrors();
|
||||||
}
|
}
|
||||||
|
|
@ -746,8 +746,9 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(config : HostConfig<T, P,
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// We caught an error during either the begin or complete phases.
|
// We caught an error during either the begin or complete phases.
|
||||||
const failedWork = nextUnitOfWork;
|
const failedWork = nextUnitOfWork;
|
||||||
|
|
||||||
if (failedWork !== null) {
|
if (failedWork !== null) {
|
||||||
// Reset the priority context to its value before reconcilation.
|
// Reset the priority context to its value before reconciliation.
|
||||||
priorityContext = priorityContextBeforeReconciliation;
|
priorityContext = priorityContextBeforeReconciliation;
|
||||||
|
|
||||||
// "Capture" the error by finding the nearest boundary. If there is no
|
// "Capture" the error by finding the nearest boundary. If there is no
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,7 @@ function findInsertionPosition(queue, update) : Update | null {
|
||||||
// To solve this, in the case where the incoming update needs to be inserted
|
// 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
|
// 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
|
// 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.
|
// is always added to the front of the list.
|
||||||
//
|
//
|
||||||
// However, if incoming update is inserted into the same position of both lists,
|
// However, if incoming update is inserted into the same position of both lists,
|
||||||
|
|
|
||||||
|
|
@ -502,7 +502,7 @@ describe('ReactIncremental', () => {
|
||||||
|
|
||||||
ops = [];
|
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.
|
// middle content.
|
||||||
ReactNoop.render(<Foo text="foo" text2="bar" step={0} />);
|
ReactNoop.render(<Foo text="foo" text2="bar" step={0} />);
|
||||||
ReactNoop.flush();
|
ReactNoop.flush();
|
||||||
|
|
@ -528,7 +528,7 @@ describe('ReactIncremental', () => {
|
||||||
|
|
||||||
ops = [];
|
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.
|
// The middle content will bailout so it remains untouched.
|
||||||
ReactNoop.render(<Foo text="foo" text2="bar" step={1} />);
|
ReactNoop.render(<Foo text="foo" text2="bar" step={1} />);
|
||||||
ReactNoop.flushDeferredPri(30);
|
ReactNoop.flushDeferredPri(30);
|
||||||
|
|
@ -694,7 +694,7 @@ describe('ReactIncremental', () => {
|
||||||
|
|
||||||
ops = [];
|
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.
|
// The middle content will bailout so it remains untouched.
|
||||||
ReactNoop.render(<Foo text="foo" step={1} />);
|
ReactNoop.render(<Foo text="foo" step={1} />);
|
||||||
ReactNoop.flushDeferredPri(30);
|
ReactNoop.flushDeferredPri(30);
|
||||||
|
|
|
||||||
|
|
@ -406,7 +406,7 @@ describe('ReactIncrementalSideEffects', () => {
|
||||||
div(div(span('Hi'), span('foo'))),
|
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
|
// render some higher priority work. The middle content will bailout so
|
||||||
// it remains untouched which means that it should reuse it next time.
|
// it remains untouched which means that it should reuse it next time.
|
||||||
ReactNoop.render(<Foo text="foo" step={1} />);
|
ReactNoop.render(<Foo text="foo" step={1} />);
|
||||||
|
|
@ -472,7 +472,7 @@ describe('ReactIncrementalSideEffects', () => {
|
||||||
div(div(span('Hi'), span('foo'))),
|
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
|
// render some higher priority work. The middle content will bailout so
|
||||||
// it remains untouched which means that it should reuse it next time.
|
// it remains untouched which means that it should reuse it next time.
|
||||||
ReactNoop.render(<Foo text="foo" step={1} />);
|
ReactNoop.render(<Foo text="foo" step={1} />);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user