Comments (8)
@gkatsanos In the meantime you can rename your new middleware to "errors" and this should fix the error you're seeing. We will have a fix for this out in the next few hours.
from devour-client.
Seems that this broke from "2.0.27"
, to "2.1.0"
from devour-client.
@kevincoenegrachts worked on the PR for this. He'd have more insight.
from devour-client.
Looks like we are checking to see if the new middleware name exists in the middleware stack rather than the middleware we would be replacing... There's a debate to be had here about whether this function should keep the middleware it's replacing's name. For backwards compatibility it's necessary that we only check the middleware we're replacing's name.
This:
https://github.com/twg/devour/blob/master/src/index.js#L282-L285
Becomes:
replaceMiddleware (middlewareName, newMiddleware) {
if (!this.middlewareExists(middlewareName)) {
Logger.error('The middleware ' + middlewareName + ' does not exists')
return
}
if (this.middlewareExists(newMiddleware.name)) {
Logger.error('The middleware ' + newMiddleware.name + ' already exists')
return
}
let index = _findIndex(this.middleware, ['name', middlewareName])
this.middleware[index] = newMiddleware
}
This should ensure backwards compat.
from devour-client.
did this got fixed?
from devour-client.
@Auspicus Did this get fixed?
I was also wondering where is devour 2.x ? (I saw it mentioned in the README but its nowhere to be found)
from devour-client.
This still needs to be fixed. Happy to merge a PR for this if anyone has the time.
from devour-client.
@Auspicus I made a PR that will fix this: #206 . Merge at will 😄
from devour-client.
Related Issues (20)
- Including recursive relationships result in null object
- "Included" related resources are wiped if server does not support compound documents
- Is this project dead? HOT 2
- Improve Documentation HOT 1
- How to handle refresh Token HOT 2
- TypeScript type definitions HOT 4
- Way to consume relationships on the fly ? HOT 2
- `get` does not add model to req object HOT 2
- Congratulations and questions HOT 2
- Support for relationship metadata deserialization
- The example under Quick Start in the README confusingly uses "post"
- Please consider using release notes
- Add option to specify log level
- Update axios package to > 0.21.1 to solve security vulnerability HOT 14
- move CI to either travis-ci.com or github actions HOT 2
- Cross check JSON:API 1.1 compatibility
- Move devour to its own GitHub Org HOT 13
- API resource definition for model "foo" not found.
- Missing Relationship Function: DELETE HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devour-client.