mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-10-29 16:43:33 +03:00
new Error to Error
This commit is contained in:
parent
870019d2df
commit
644c8ad389
13 changed files with 44 additions and 44 deletions
|
|
@ -2,7 +2,7 @@ var captionPlaceholder = {};
|
|||
ko.bindingHandlers['options'] = {
|
||||
'init': element => {
|
||||
if (!element.matches("SELECT"))
|
||||
throw new Error("options binding applies only to SELECT elements");
|
||||
throw Error("options binding applies only to SELECT elements");
|
||||
|
||||
// Remove all existing <option>s.
|
||||
let l = element.length;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
ko.bindingHandlers['submit'] = {
|
||||
'init': (element, valueAccessor, allBindings, viewModel, bindingContext) => {
|
||||
if (typeof valueAccessor() != "function")
|
||||
throw new Error("The value for a submit binding must be a function");
|
||||
throw Error("The value for a submit binding must be a function");
|
||||
element.addEventListener("submit", event => {
|
||||
var handlerReturnValue;
|
||||
var value = valueAccessor();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue