mirror of
https://github.com/tenrok/BBob.git
synced 2026-06-14 18:42:24 +03:00
* fix: TagNode.create with null content by default * Create five-meals-sing.md * fix: tests * fix(preset): types inference * fix: preset types * fix: preset types * fix: lock file, parser and utils * refactor: move types to separate package * fix(preset): add @bbob/core to dev deps * fix(preset): lock file * test(preset-vue): create tags * test(preset-vue): tests * chore(nx): fix nx cover deps * chore: changesets
This commit is contained in:
@@ -35,6 +35,10 @@ export class CharGrabber {
|
||||
}
|
||||
|
||||
getCurr() {
|
||||
if (typeof this.s[this.c.pos] === 'undefined') {
|
||||
return ''
|
||||
}
|
||||
|
||||
return this.s[this.c.pos]
|
||||
}
|
||||
|
||||
@@ -51,7 +55,11 @@ export class CharGrabber {
|
||||
getPrev() {
|
||||
const prevPos = this.c.pos - 1;
|
||||
|
||||
return typeof this.s[prevPos] !== 'undefined' ? this.s[prevPos] : null;
|
||||
if (typeof this.s[prevPos] === 'undefined') {
|
||||
return null
|
||||
}
|
||||
|
||||
return this.s[prevPos];
|
||||
}
|
||||
|
||||
isLast() {
|
||||
|
||||
Reference in New Issue
Block a user