mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-24 09:08:15 +00:00
Error when building with haul: ref to pathToRegexp.compile (#4658)
Error in source code that cause problem on react native using haul https://puu.sh/AT1uZ/158623d5a4.png
This commit is contained in:
parent
67233dc9ef
commit
714d5eab6b
@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
### Fixed
|
||||
- Error when building with haul: ref to pathToRegexp.compile(#4658).
|
||||
|
||||
## [2.9.1] - [2018-07-24](https://github.com/react-navigation/react-navigation/releases/tag/2.9.1)
|
||||
### Fixed
|
||||
|
@ -1,4 +1,4 @@
|
||||
import pathToRegexp from 'path-to-regexp';
|
||||
import pathToRegexp, { compile } from 'path-to-regexp';
|
||||
import NavigationActions from '../NavigationActions';
|
||||
import invariant from '../utils/invariant';
|
||||
|
||||
@ -106,8 +106,7 @@ export const createPathParser = (
|
||||
extendedPathRe,
|
||||
extendedPathReKeys,
|
||||
isWildcard,
|
||||
toPath:
|
||||
pathPattern === null ? () => '' : pathToRegexp.compile(pathPattern),
|
||||
toPath: pathPattern === null ? () => '' : compile(pathPattern),
|
||||
};
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user