Create post viewer
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
module.exports = function(...items) {
|
||||
items.forEach(item => {
|
||||
items.forEach((item, index) => {
|
||||
if (item === undefined || (item && item.constructor && item.constructor.name == "Object" && Object.keys(item).length == 0)) {
|
||||
throw new Error("Bad import: item looks like this: "+JSON.stringify(item))
|
||||
console.log(`Bad import for arg index ${index}`)
|
||||
// @ts-ignore
|
||||
require("/") // generate an error with a require stack.
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user