Cleanup Codeclimate smells (#11)

* Cleanup Codeclimate smells

* Add Codeclimate badges
This commit is contained in:
Jaco Greeff authored and GitHub committed 2018-12-08 16:37:05 +01:00
1 parent 9aaea82544
commit 91db30af82
11 files changed
+134 -140

No files matched your search

+2 -3
View File
@@ -7,6 +7,7 @@ import { SingleAddress } from '../observable/types';
import { KeyringOptions, KeyringOptionInstance, KeyringSectionOption, KeyringSectionOptions } from './types';
import { BehaviorSubject } from 'rxjs';
import { assert } from '@polkadot/util';
import observableAll from '../observable';
@@ -26,9 +27,7 @@ class KeyringOption implements KeyringOptionInstance {
}
init (keyring: KeyringStruct): void {
if (hasCalledInitOptions) {
throw new Error('Unable to initialise options more than once');
}
assert(!hasCalledInitOptions, 'Unable to initialise options more than once');
observableAll.subscribe((value) => {
const options = this.emptyOptions();