Skip to content

Conversation

eXon
Copy link
Contributor

@eXon eXon commented Aug 2, 2015

This is fixing a huge bug for the isActive. If I had a path starting with /hell and another by /hello, isActive would think /hello is active when I am on the /hell URL. This is perfectly fixed now :)

I wasn't able to write unit tests because karma start was crashing for me. I would get this:
(Looks like Travis was having the same error before my PR)

WARN [preprocess]: Can not load "webpack"!
  TypeError: Object [object Object] has no method 'refreshFiles'
    at Plugin.notifyKarmaAboutChanges (/var/git/thereactivestack/react-router/node_modules/karma-webpack/index.js:108:15)
    at Plugin.<anonymous> (/var/git/thereactivestack/react-router/node_modules/karma-webpack/index.js:72:9)
    at Tapable.applyPlugins (/var/git/thereactivestack/react-router/node_modules/webpack/node_modules/tapable/lib/Tapable.js:26:37)
    at Watching._done (/var/git/thereactivestack/react-router/node_modules/webpack/lib/Compiler.js:78:17)
    at Watching.<anonymous> (/var/git/thereactivestack/react-router/node_modules/webpack/lib/Compiler.js:61:18)
    at Tapable.emitRecords (/var/git/thereactivestack/react-router/node_modules/webpack/lib/Compiler.js:281:37)
    at Watching.<anonymous> (/var/git/thereactivestack/react-router/node_modules/webpack/lib/Compiler.js:58:19)
    at /var/git/thereactivestack/react-router/node_modules/webpack/lib/Compiler.js:274:11
    at Tapable.applyPluginsAsync (/var/git/thereactivestack/react-router/node_modules/webpack/node_modules/tapable/lib/Tapable.js:60:69)
    at Tapable.afterEmit (/var/git/thereactivestack/react-router/node_modules/webpack/lib/Compiler.js:271:8)
INFO [karma]: Karma v0.12.37 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 44.0.2403 (Linux 0.0.0)]: Connected on socket k3-vXGcIA8yu4S8lLBYy with id 79713155
Chrome 44.0.2403 (Linux 0.0.0) ERROR
  Uncaught ReferenceError: require is not defined
  at /var/git/thereactivestack/react-router/tests.webpack.js:1
Chrome 44.0.2403 (Linux 0.0.0): Executed 0 of 0 ERROR (0.047 secs / 0 secs)

@eXon
Copy link
Contributor Author

eXon commented Aug 2, 2015

This is also fixing #1611 and #1614

isActive('/') should only be true if it is a perfect match (would be useless otherwise)

@eXon
Copy link
Contributor Author

eXon commented Aug 4, 2015

For the unit tests not running, I have the same problem on my projects. It is due to karma-webpack version 1.7 is the reason of the crash. Using a dependency on ~1.6 and karma ~0.12 seems to do the trick for now until they fix the issues.

@mjackson
Copy link
Member

This is fixed in master.

@mjackson mjackson closed this Aug 10, 2015
@eXon eXon deleted the master branch August 10, 2015 01:34
@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants