Unverified Commit 372ed022 authored by Liana Husikyan's avatar Liana Husikyan Committed by GitHub

check for key is defined

parent bc5f59e1
......@@ -48,7 +48,7 @@ export class VerticalIcons extends Plugin {
const types = ['error', 'warning', 'success', 'info', '']
const fn = (status) => {
if (!types.includes(status.type) && status.type) throw new Error(`type should be ${keys.join()}`)
if (!status.key) throw new Error(`status key should be defined`)
if (status.key === undefined) throw new Error(`status key should be defined`)
if (typeof status.key === 'string' && (!keys.includes(status.key))) {
throw new Error('key should contain either number or ' + keys.join())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment