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

react-router-navigation-prompt

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-navigation-prompt - npm Package Compare versions

Comparing version 1.1.2 to 1.2.1

2

package.json
{
"name": "react-router-navigation-prompt",
"version": "1.1.2",
"version": "1.2.1",
"description": "A replacement component for the react-router `<Prompt/>`. Allows for more flexible dialogs.",

@@ -5,0 +5,0 @@ "scripts": {

@@ -30,3 +30,3 @@ import React from 'react';

this.unblock = props.history.block((nextLocation, action) => {
if (props.when) {
if (this.props.when) {
this.setState({

@@ -38,3 +38,3 @@ action,

}
return !props.when;
return !this.props.when;
});

@@ -88,3 +88,3 @@ this.state = {action: null, nextLocation: null, isActive: false};

render() {
if (!this.state.isActive) return null;
if (!this.state.isActive && !this.props.renderIfNotActive) return null;
return (

@@ -91,0 +91,0 @@ <div>

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