防止小游戏函数丢失console.assert

This commit is contained in:
YHH
2022-02-24 09:38:07 +08:00
parent 713f4ae18b
commit 8135f99616
3 changed files with 6 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
module es {
export class Insist {
public static fail(message: string = null, ...args: any[]) {
if (!console.assert)
return;
if (message == null) {
console.assert(false);
} else {