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

flux-router-component

Package Overview
Dependencies
Maintainers
4
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flux-router-component - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

9

actions/navigate.js

@@ -1,2 +0,3 @@

var debug = require('debug')('navigateAction');
var debug = require('debug')('navigateAction'),
url = require('url');

@@ -17,2 +18,8 @@ module.exports = function (context, payload, done) {

}
// add parsed query parameter object to route object,
// and make it part of CHANGE_ROUTE_XXX action payload.
var parsed = route.path && url.parse(route.path, true);
route.query = (parsed && parsed.query) || {};
debug('dispatching CHANGE_ROUTE', route);

@@ -19,0 +26,0 @@ context.dispatch('CHANGE_ROUTE_START', route);

12

lib/History.js

@@ -60,3 +60,4 @@ /**

/**
* Gets the path string (or hash fragment for old browsers that don't support pushState).
* Gets the path string (or hash fragment for old browsers that don't support pushState),
* including the pathname and search query (if it exists).
* @method getPath

@@ -66,6 +67,7 @@ * @return {String} The path string that denotes current route path

getPath: function () {
var path = this.win.location.pathname,
hash;
if (!this._hasPushState && (hash = this.getHash())) {
return hash;
var location = this.win.location,
path = location.pathname + location.search;
if (!this._hasPushState) {
return this.getHash() || path;
}

@@ -72,0 +74,0 @@ return path;

{
"name": "flux-router-component",
"version": "0.3.0",
"version": "0.3.1",
"description": "Router-related React component and mixin for applications with Flux architecture",

@@ -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