maishu-chitu
Advanced tools
Comparing version 2.9.25 to 2.9.26
/*! | ||
* | ||
* maishu-chitu v2.9.25 | ||
* maishu-chitu v2.9.26 | ||
* https://github.com/ansiboy/chitu | ||
@@ -579,4 +579,10 @@ * | ||
var msg = "The site map node ".concat(name, " is exists."); | ||
return new Error(name); | ||
return new Error(msg); | ||
} | ||
}, { | ||
key: "unexpectedNullValue", | ||
value: function unexpectedNullValue() { | ||
var msg = "Unexpected null value."; | ||
return new Error(msg); | ||
} | ||
}]); | ||
@@ -611,3 +617,3 @@ | ||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! maishu-chitu-service */ "maishu-chitu-service")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, maishu_chitu_service_1) { | ||
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! maishu-chitu-service */ "maishu-chitu-service"), __webpack_require__(/*! ./Errors */ "./out-es5/Errors.js")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, maishu_chitu_service_1, Errors_1) { | ||
"use strict"; | ||
@@ -699,5 +705,5 @@ | ||
this.on_closing(); | ||
this._element.remove(); | ||
var parentElement = this._element.parentElement; | ||
if (parentElement == null) throw Errors_1.Errors.unexpectedNullValue(); | ||
parentElement.removeChild(this._element); | ||
this.on_closed(); | ||
@@ -704,0 +710,0 @@ return Promise.resolve(); |
/*! | ||
* | ||
* maishu-chitu v2.9.25 | ||
* maishu-chitu v2.9.26 | ||
* https://github.com/ansiboy/chitu | ||
@@ -419,4 +419,8 @@ * | ||
let msg = `The site map node ${name} is exists.`; | ||
return new Error(name); | ||
return new Error(msg); | ||
} | ||
static unexpectedNullValue() { | ||
let msg = `Unexpected null value.`; | ||
return new Error(msg); | ||
} | ||
} | ||
@@ -437,3 +441,3 @@ exports.Errors = Errors; | ||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! maishu-chitu-service */ "maishu-chitu-service")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, maishu_chitu_service_1) { | ||
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__, exports, __webpack_require__(/*! maishu-chitu-service */ "maishu-chitu-service"), __webpack_require__(/*! ./Errors */ "./out/Errors.js")], __WEBPACK_AMD_DEFINE_RESULT__ = (function (require, exports, maishu_chitu_service_1, Errors_1) { | ||
"use strict"; | ||
@@ -492,3 +496,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
this.on_closing(); | ||
this._element.remove(); | ||
let parentElement = this._element.parentElement; | ||
if (parentElement == null) | ||
throw Errors_1.Errors.unexpectedNullValue(); | ||
parentElement.removeChild(this._element); | ||
this.on_closed(); | ||
@@ -495,0 +502,0 @@ return Promise.resolve(); |
@@ -1,3 +0,2 @@ | ||
let node_modules = 'node_modules' | ||
| ||
const webpackES6Config = require('./webpack.config.js'); | ||
@@ -18,5 +17,2 @@ let webpackES5Config = Object.assign({}, webpackES6Config) | ||
}, | ||
// webpack: { | ||
// command: `webpack` | ||
// } | ||
}, | ||
@@ -23,0 +19,0 @@ webpack: { |
@@ -164,4 +164,10 @@ "use strict"; | ||
var msg = "The site map node ".concat(name, " is exists."); | ||
return new Error(name); | ||
return new Error(msg); | ||
} | ||
}, { | ||
key: "unexpectedNullValue", | ||
value: function unexpectedNullValue() { | ||
var msg = "Unexpected null value."; | ||
return new Error(msg); | ||
} | ||
}]); | ||
@@ -168,0 +174,0 @@ |
@@ -9,3 +9,3 @@ "use strict"; | ||
define(["require", "exports", "maishu-chitu-service"], function (require, exports, maishu_chitu_service_1) { | ||
define(["require", "exports", "maishu-chitu-service", "./Errors"], function (require, exports, maishu_chitu_service_1, Errors_1) { | ||
"use strict"; | ||
@@ -97,5 +97,5 @@ | ||
this.on_closing(); | ||
this._element.remove(); | ||
var parentElement = this._element.parentElement; | ||
if (parentElement == null) throw Errors_1.Errors.unexpectedNullValue(); | ||
parentElement.removeChild(this._element); | ||
this.on_closed(); | ||
@@ -102,0 +102,0 @@ return Promise.resolve(); |
@@ -26,2 +26,3 @@ export declare class Errors { | ||
static duplicateSiteMapNode(name: string): Error; | ||
static unexpectedNullValue(): Error; | ||
} |
@@ -98,6 +98,10 @@ define(["require", "exports"], function (require, exports) { | ||
let msg = `The site map node ${name} is exists.`; | ||
return new Error(name); | ||
return new Error(msg); | ||
} | ||
static unexpectedNullValue() { | ||
let msg = `Unexpected null value.`; | ||
return new Error(msg); | ||
} | ||
} | ||
exports.Errors = Errors; | ||
}); |
@@ -1,2 +0,2 @@ | ||
define(["require", "exports", "maishu-chitu-service"], function (require, exports, maishu_chitu_service_1) { | ||
define(["require", "exports", "maishu-chitu-service", "./Errors"], function (require, exports, maishu_chitu_service_1, Errors_1) { | ||
"use strict"; | ||
@@ -55,3 +55,6 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
this.on_closing(); | ||
this._element.remove(); | ||
let parentElement = this._element.parentElement; | ||
if (parentElement == null) | ||
throw Errors_1.Errors.unexpectedNullValue(); | ||
parentElement.removeChild(this._element); | ||
this.on_closed(); | ||
@@ -58,0 +61,0 @@ return Promise.resolve(); |
@@ -36,3 +36,3 @@ { | ||
}, | ||
"version": "2.9.25" | ||
"version": "2.9.26" | ||
} |
@@ -95,5 +95,9 @@ export class Errors { | ||
let msg = `The site map node ${name} is exists.` | ||
return new Error(name); | ||
return new Error(msg); | ||
} | ||
static unexpectedNullValue() { | ||
let msg = `Unexpected null value.` | ||
return new Error(msg); | ||
} | ||
} | ||
import { PageMaster } from "./PageMaster"; | ||
import { IService, ServiceConstructor, Service, Callbacks, Callback1 } from "maishu-chitu-service"; | ||
import { Errors } from "./Errors"; | ||
@@ -94,3 +95,9 @@ export type PageData = { [key: string]: string | Function } | ||
this.on_closing(); | ||
this._element.remove(); | ||
// this._element.remove(); | ||
let parentElement = this._element.parentElement as HTMLElement; | ||
if (parentElement == null) | ||
throw Errors.unexpectedNullValue() | ||
parentElement.removeChild(this._element); | ||
this.on_closed(); | ||
@@ -97,0 +104,0 @@ return Promise.resolve(); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
396286
6453