taion / use-named-routes

[No Maintenance Intended] Drop-in named route support for React Router
MIT License
105 stars 8 forks source link

Respect action in createLocation. Fixes #17. #18

Closed maspwr closed 8 years ago

maspwr commented 8 years ago

Before this change, the createLocation function ignored the action parameter from createLocationFromRedirectInfo which broke the behavior of IndexRedirect.

maspwr commented 8 years ago

/cc @taion

By the way, how do you build the source? I tried the following:

% babel src/index.js
TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1324:5)
    at /usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:36
    at /usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:396:22
    at Array.map (native)
    at OptionManager.resolvePresets (/usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:385:20)
    at OptionManager.mergePresets (/usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:369:10)
    at OptionManager.mergeOptions (/usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328:14)
    at /usr/local/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:370:14
    at /usr/local/%
taion commented 8 years ago

npm run build ought to work.

maspwr commented 8 years ago

npm run build ought to work.

Worked perfectly. Thanks!

taion commented 8 years ago

Released as v0.3.1.