Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-link

Package Overview
Dependencies
Maintainers
1
Versions
693
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-link - npm Package Compare versions

Comparing version 1.0.0-alpha12-alpha.bdc68bfd to 1.0.0-alpha12-alpha.faff3fa9

31

index.js

@@ -29,27 +29,22 @@ "use strict";

},
componentDidMount: function componentDidMount() {
var _this = this;
// Only enable prefetching of Link resources in production and for browsers that
// don't support service workers *cough* Safari/IE *cough*.
if (process.env.NODE_ENV === "production" && !("serviceWorker" in navigator)) {
(function () {
var routes = window.gatsbyRootRoute;
var routes = window.gatsbyRootRoute;
var _require = require("history"),
createMemoryHistory = _require.createMemoryHistory;
var _require = require("history"),
createMemoryHistory = _require.createMemoryHistory;
var matchRoutes = require("react-router/lib/matchRoutes");
var getComponents = require("react-router/lib/getComponents");
var matchRoutes = require("react-router/lib/matchRoutes");
var getComponents = require("react-router/lib/getComponents");
var createLocation = createMemoryHistory().createLocation;
var createLocation = createMemoryHistory().createLocation;
if (typeof routes !== "undefined") {
matchRoutes([routes], createLocation(_this.props.to), function (error, nextState) {
getComponents(nextState, function () {
return console.log("loaded assets for " + _this.props.to);
});
});
}
})();
if (typeof routes !== "undefined") {
matchRoutes([routes], createLocation(this.props.to), function (error, nextState) {
getComponents(nextState, function () {
return console.log("loaded assets for " + _this.props.to);
});
});
}

@@ -56,0 +51,0 @@ },

{
"name": "gatsby-link",
"version": "1.0.0-alpha12-alpha.bdc68bfd",
"version": "1.0.0-alpha12-alpha.faff3fa9",
"description": "An enhanced Link component for Gatsby sites with support for resource prefetching",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc