Skip to content

Commit e6e7bfb

Browse files
committed
Improved code
1 parent 958fbcf commit e6e7bfb

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

dist/plugins/showdown.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ const EasyCoder_Showdown = {
2020

2121
run: program => {
2222
const command = program[program.pc];
23-
if (program.isUndefined(this.showdown_loaded)) {
23+
if (typeof showdown === `undefined`) {
2424
program.require(`js`, `https://unpkg.com/showdown@1.9.1/./dist/showdown.js`, function () {
25-
this.showdown_loaded = true;
2625
EasyCoder_Showdown.setupExtension();
2726
program.run(command.pc + 1);
2827
});

js/plugins/showdown.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ const EasyCoder_Showdown = {
2020

2121
run: program => {
2222
const command = program[program.pc];
23-
if (program.isUndefined(this.showdown_loaded)) {
23+
if (typeof showdown === `undefined`) {
2424
program.require(`js`, `https://unpkg.com/showdown@1.9.1/./dist/showdown.js`, function () {
25-
this.showdown_loaded = true;
2625
EasyCoder_Showdown.setupExtension();
2726
program.run(command.pc + 1);
2827
});

0 commit comments

Comments
 (0)