Update media/src/core/core.data.js

Moved this on its own (closed pull also included changes to if/else):
- Don't try splitting the string in fetchData unless the string is not empty