Comments (6)
Hi @felixjung, the thing is some contentTypes may or may not have an editor interface. The bug here is that I forgot to set response.editorInterfaces
to []
if the length is 0, I will push a fix right away
from contentful-batch-libs.
here is the commit : 35ee3f3
from contentful-batch-libs.
Hm yeah, I understand that. My point was just that instead of having any if clause at all, you could just run the .map
call anyway. In code, I think
.then((response) => {
if (response.contentTypes.length !== 0) {
response.editorInterfaces = getEditorInterfaces(response.contentTypes)
return Promise.props(response)
}
response.editorInterfaces = []
return response
})
and this
.then((response) => {
response.editorInterfaces = getEditorInterfaces(response.contentTypes)
return Promise.props(response)
})
are essentially the same, because the call to getEditorInterfaces()
will return a promise resolving to an empty array when response.contentTypes
is []
, anyway. If I'm right, that would be cleaner, no?
from contentful-batch-libs.
@felixjung I agree with u but since we will refactor the logic in there in the near future and the actual bug was fixed in last December, I will close this ticket for now.
from contentful-batch-libs.
Is this still going to be addressed in 'the near future'?
from contentful-batch-libs.
Is this still going to be addressed in 'the near future'?
Yes. Can't be more precise because there are high priorities at the moment, but that's very much on top of the list.
What are you missing @iolloyd? We are (sadly) no superheroes, every PR is welcome :)
from contentful-batch-libs.
Related Issues (13)
- shasum Check Failed
- Importing of roles from contentful-export script HOT 4
- includeDrafts is ignored for Assets (drafts are returned, but shouldn't) HOT 4
- The automated release is failing 🚨
- Breaking Node Version Update Added in 9.5.1 Patch HOT 1
- Allow optional property for locales
- Asset transformation is returning an asset with empty file field
- Request size exceeds 8 MB
- Misleading error message in getFullSourceSpace (copy-paste?) HOT 1
- Draft handling in pushToSpace is wrong HOT 3
- Enable async transforms HOT 3
- batchedIdQuery inconsistent HOT 9
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 contentful-batch-libs.