added migrations for instant delivery
This commit is contained in:
18
node_modules/react-router/lib/getWindowScrollPosition.js
generated
vendored
Normal file
18
node_modules/react-router/lib/getWindowScrollPosition.js
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
'use strict';
|
||||
|
||||
var invariant = require('react/lib/invariant');
|
||||
var canUseDOM = require('react/lib/ExecutionEnvironment').canUseDOM;
|
||||
|
||||
/**
|
||||
* Returns the current scroll position of the window as { x, y }.
|
||||
*/
|
||||
function getWindowScrollPosition() {
|
||||
invariant(canUseDOM, 'Cannot get current scroll position without a DOM');
|
||||
|
||||
return {
|
||||
x: window.pageXOffset || document.documentElement.scrollLeft,
|
||||
y: window.pageYOffset || document.documentElement.scrollTop
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = getWindowScrollPosition;
|
||||
Reference in New Issue
Block a user